I help run a forum using the Simple Machines Forum framework. The forum's time settings are correct--all the posts show up as the correct time for the poster's time zone.
We installed a plugin (SMF calls it a package) for a little online-user chat function. The timestamp on this chat program is not correct--it doesn't match the forum. I am based in Michigan (GMT-4), but it always shows four hours later than my current time (GMT 0).
I have done a huge amount of research on this and here is what I've got.
Have you changed the php.ini file in the root directory's date.timezone setting?
Yes.
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/New_York"
Have you modified the index.php file in the plugin directory's date_default_timezone_set setting?
Yes.
if (!ini_get('date.timezone'))
date_default_timezone_set('America/New_York');
I'm not terribly well versed in PHP, so I might have added a space or missed a semicolon or something that I just wouldn't know to notice. One thing I DID notice is that the timestamps of previous messages (before a hard refresh) in the chat log will adjust the time if I change the timezone. Current messages however still stick at GMT0, so I wonder if something somewhere is overriding the timezone I'm trying to set for it.
I'm at an absolute loss for what to check next. I'm out of my depth, as it is.