At 21:32 -0700 17/9/05, Brion Vibber wrote:
Bill Clark wrote:
Actually, it looks like the timestamps are simply
getting all screwed up in
Article.php for some reason.
What's really weird is that the timestamp seems to be losing exactly one
hour between the $this->loadLastEdit() line in getTimestamp() and when it's
actually returned. Nothing is happening in the code between those two lines,
yet somehow the timestamp changes. This makes no sense whatsoever. Clearly
I'm misunderstanding something here.
Is this on every page or some particular page?
When was the page last edited? Was it during a daylight saving time
transition in your server's timezone?
Some versions of PHP have a bug where timestamps going through
gmmktime() and gmdate() get converted to/from local time internally,
which can corrupt them if they occur during a daylight saving time
transition (hence ambiguous timezone); the result is a time that's one
hour off, and matching timestamps no longer match.
If you're experiencing this, try adding in your LocalSettings.php:
putenv("TZ=UTC");
-- brion vibber (brion @
pobox.com)
I also had this problem (a few months back). I had installed on two
servers. The problem appeared on a server with mysql4 and not on the
server with mysql3. But that may irrelevant.
The problem disappeared (with 1.5.x releases as I recall) and I have
hence removed the fix below from LocalSettings.php
# Ugly hack warning! This needs smoothing out.
$wgLocaltimezone = "UTC";
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
$wgLocalTZoffset = date("Z") / 3600;
putenv("TZ=$oldtz");
Not sure who suggested this workaround?
Gordo
--
"Think Feynman"/////////
http://pobox.com/~gordo/
gordon.joly(a)pobox.com///