By schettj on
Standard 6.x install, current on all modules except cck/views (I am 1 rev back on those, I tried updating those and the site won't render... skipping that for now, reverted back)
Drupal knows I am in the PST TZ, Apache/PHP agree, and my OS thinks so too... they all have the correct time, and it is set in the Date and Time such that it shows the correct time...
I post something, and it says
"Submitted by schettino on September 11, 2008 - 2:50am"
Cool, except it was posted @7:50 PM on the 10th - the time is +7 hours....
If I check the content recent post list, it knows how to do time DELTAs...
"Blog entry Drupal death spiral schettino 0 21 min 30 sec ago"
Any ideas?
Comments
Do you have user specific
Do you have user specific time zones enabled? If so, is your personal time zone setting correct in your account settings?
--
Erik
https://twitter.com/erik_smith
No I do not. Time is
No I do not. Time is displayed wrong if not logged in, if logged in as super user, or as regular user.
Fixed, by editing includes/common.inc
Well, this is weird.
I took a look at includes/common.inc where the format_date function lives. Every place that computes the time in that function uses gmdate(), which returns the date in GMT - ie, it ignores your timezone setting.
Changing that to date() fixed all the dates just fine.
It's 5:25am local time for me now (don't ask!)
Now I'm getting...
Which is perfect.
This can't be a bug. Why are they using gmdate() to render the date, thus ignoring the timezone setting???
The Id on my copy of includes/common.inc is
// $Id: common.inc,v 1.756.2.24 2008/08/13 23:59:12 drumm Exp $Should I file a bug report?
Well, not fixed
No joy after all. That fixed the dates on previously submitted items. New items come up behind in time instead of ahead of time, unless I change the date/time setting to be +0000 in the admin section. It's almost as if the timezone is being applied twice, somehow/somewhere - once when the item is saved (ie, the timestamp is converted to a local time) and then again when it is rendered... I give up.