Sorry to reply to this after a long time. But I needed to look into the
code and also separate Slash problems from bugs on my platform (Digital
Unix) regarding timezones.
Patrick Galbraith wrote:
> the whole reason behind using GMT is that a slash site can have users
> around the world who can have their own time preferences.
Yes, I perfectly realize that (which is my requirement, BTW). The point
is that this places a burden on the system setup where it should belong
to the application logic, either in the code itself or the database
connection.
I cannot run my machines on GMT (I don't have a separate box for Slash)
and putting a TZ=GMT on safe_mysqld doesn't seem to work. But both of
these things affect other software, so why cannot Slash play it nice and
do the proper calculations?
I found a fix that seems to work for Slash 1.0.9, in Slash.pm I use
Time::Zone and call once tz_local_offset and store it. Then I
recalculate $I{timezones} taking care of this local offset. The only
problem I see is that when DST jumps in you can have uncorrect answers
because the cached tz_local_offset has been calculated before the
change.
it's very simple, I've uploaded it Sourceforge:
<http://sourceforge.net/patch/download.php?id=103482>
I am looking at the Bender sourcecode for something similar.
--
Alessio F. Bragadini al...@al...
APL Financial Services http://village.albourne.com
Nicosia, Cyprus phone: +357-2-755750
"It is more complicated than you think"
-- The Eighth Networking Truth from RFC 1925
|