I've been struggling to figure out why the scheduler module won't work and I read other threads on dealing with potentially incorrect UTC config on the server. I thought that perhaps this was the case for me.
When I go /scheduler/timecheck, the page says:
Your server reports the UTC time as 2008-02-13 12:02:13 and "localtime" as 2008-2-13 12:2:13.
If all is well with your server's time configuration UTC should match UTC London Time and the localtime should be the time where you are.
They're the same. This was the case on two different servers that I tried.
However, from the linux command line, I got:
[jason@gnosis ~]$ date --utc
Wed Feb 13 18:02:20 UTC 2008
[jason@gnosis ~]$ date
Wed Feb 13 12:02:21 CST 2008
As you can see, the command line reports the correct UTC and properly reports the six hour difference between my local time and UTC.
Looking at the code, I see that the _scheduler_timecheck functions rely on time() and localtime(), which appear to be reporting the same thing on all servers that I've tried. Possible solution: use gmdate() instead? The gmdate() function appears to be more reliable in reporting the server's UTC than time(). On my servers, gmdate() does report the same value as the command line.
Unfortunately for me, this means that my server's time is set correctly and I still can't figure out why the module won't work!
Comments
Comment #1
jgoldberg commentedI have the same result.
Comment #2
skiminki commentedOk, I confirm. I'm going to look at this soon.
Comment #3
skiminki commentedAFAICT, in this case the page returns local time twice. It should use
date()that formats timezone-aware date/time andgmdate()that formats date/time in UTC. Indeed, 5.12 has some timezone related problems of which the most important ones should be already fixed in 5.13-rc1.Fix to the timecheck page:
http://drupal.org/cvs?commit=113304
Comment #4
skiminki commented