I’m on EST…is there a way to change the way the time posts when I post an entry?
If you want to post the date in your timezone directly into a database, it depends on your version of PHP.
For PHP 5: simply use
date_default_timezone_set('Australia/Sydney'). When you format a date, it’ll use Sydney time (or whatever time you wish, see PHP’s list of timezones).
For PHP 4: use
putenv('TZ=Australia/Sydney') to get the same effect as above, or use
gmdate and determine the offset from UTC for your timezone.
However, I suggest saving times in the database as UTC time, then displaying them using an offset. That way, it’s much easier to display times for people in other timezones (if you were to offer a way for visitors to choose their own).
You must be logged in to reply to this topic.