Matthew wrote:
Alternately, use DateTime:
I tried to do so. The problem is that the date's are stored in the
users local timezone and we only store the offset from GMT. (ex: -6 or 7)
Is there some array or table I can use to convert '-6' to something
DateTime:: can use?
Epochs are UTC on most systems, so you're probably storing them as UTC ..
-6 is meaningless and so useless for DST calculations.
Last week Melbourne, Sydney and Brisbane were all +1000. Now Melbourne
and Sydney are +1100, but Brisbane is still +1000. And Hobart switched
from +1000 to +1100 a few weeks earlier.
Unless you have more information that '-6' then you'll never be able to
properly convert across a DST change.
You could, of course, continue to use the UTC time zone. But you still
can't properly turn that into the user's local time zone as it's no
longer -6, but -7 or some such.
Cheers!
Rick Measham