php - Time zone issue -
what going on when time on server out 12 hours? working on site friend, , noticed although server in our timezone, 12 hours behind when writing records db. did checks so:
<?php echo(gmstrftime("it %a on %b %d, %y, %x time zone: %z",time())); phpinfo(); ?>
result:
it thu on jul 21, 2011, 04:46:46 time zone: gmt ... date date/time support enabled "olson" timezone database version 2010.15 timezone database internal default timezone pacific/auckland directive local value master value date.default_latitude 31.7667 31.7667 date.default_longitude 35.2333 35.2333 date.sunrise_zenit 90.583333 90.583333 date.sunset_zenith 90.583333 90.583333 date.timezone pacific/auckland pacific/auckland
ask can see, php reports 4:46 am. it's 4:46pm here. reports gmt timezone, phpinfo reports pacific/auckland timezone (gmt+12).
i asked webhost going on. weren't sure, system's time correct. , there no other php.ini files being introduced.
ideas?
gmstrftime reports gmt time, looks correct me. need strftime local (akl) time. php.ini has timezone set akl, again correct. correct question "what strftime (or other php current time function) report?"
Comments
Post a Comment