Here's my PHP code:
echo date('M j y g:i:A');
This doesn't display correct time. why?
Insert this at the very top of your code:
date_default_timezone_set('Asia/Manila');
NOW(), like: INSERT INTO table VALUES ("random value", NOW())SET time_zone = 'Asia/Manila' and then try to insert time again.fix the time zone in php.ini or in the code itself
Add something like this to your php.ini file date.timezone = "Asia/Manila", that will set the default without having you put in the date_default_timezone_set('Asia/Manila'); on every file that uses time functions
date.timezone = "Asia/Manila", that will set the default without having you put in the date_default_timezone_set('Asia/Manila'); on every file that uses time functions.