phpgroupware-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [phpGroupWare-users] Daylight Savings Time Issue


From: Chris Weiss
Subject: Re: [phpGroupWare-users] Daylight Savings Time Issue
Date: Mon, 12 Mar 2007 21:19:05 -0500

hm.  I was under the impression that the dates were stored as a unix
epoc timestamps in GMT and that php's date() was handling the
conversions.

just did a quick test, and without looking at the code it looks like
it saves the timestamp in whatever timezone the server is in and so
they will all be off if that is not GMT.


> Any clues as to why March dates are messed up?  If I cannot change this, does 
anyone have a quick script to move all hours in march for all entries back 1 hour?

since the times are timestamps, if need be a query could be crafted
that subtracts (60*60) to the appointments in the 3 week range.


these should do the update, I have NOT tested them as I don't have
much to test with.  make a backup of the database first or test on a
non-production system.  I seriously can't say that this won't hose the
data.

explanation first, for those that want to check my work:
1173600000 is both 2007-03-11 03:00:00 and 2007-03-11 02:00:00 (DST is
fun like that)

1175410800 is 2007-04-01 02:00:00 which is when DST would have taken
affect had the Bush administration not decided to play with our heads.

datetime is the event start, edatetime is the event end, mdatetime is
the last modified.

UPDATE phpgw_cal
SET datetime = datetime - (60*60)
WHERE mdatetime <= 1173600000 AND
        datetime >= 1173600000 AND datetime <= 1175410800

UPDATE phpgw_cal
SET edatetime = edatetime - (60*60)
WHERE mdatetime <= 1173600000 AND
        edatetime >= 1173600000 AND edatetime <= 1175410800




reply via email to

[Prev in Thread] Current Thread [Next in Thread]