Kenneth Albanowski wrote:
> Pardon me, but this is another one of my soapbox topics: yes, you can use
> GMT, but the timezone offset is anything but trivial. It changes
> seasonally (if your area uses Daylight Savings Time, or an equivalent),
> and changes with the whim of politicians. (Has your country recently been
> seized by a foreign power? Check your clocks!) And don't bet anything
> about what particular resolution is needed, especially if you aren't
> familiar with leap seconds. (No, they shouldn't affect current time-zone
> calculations, but they do affect historical conversions to local-time.)
Ooh boy, soapbox time! :-)
*I* would say that the vagaries of Daylight Savings Time are a very good
reason that times *should* be stored and manipulated in GMT rather than
local time. At least with GMT, seconds proceed in an orderly and
predicatable fashion, without any discontinuities. When manipulating
local time, apps have to be very very careful, and do a lot of extra
work (which I doubt most apps bother to do). Want to determine the
elapsed time between two times? Very difficult in local time; there
could be an extra hour added or deleted if the times are on opposite
sides of the DST change. I find things much simpler if every event has
an unambiguous time value, and two simultaneous events have the SAME
time value, independent of the geographical location of the events (I'm
of course ignoring relativistic effects).
> (Also, note the difficulties involved with setting up an appointment book
> to properly use universal- and local-time. Should appointments stick to
> the same universal time, or should they refer to local time? If I'm
> setting up an appointment to meet somebody at Noon on the other coast,
> then local time is appropriate. But it's a different matter if I need to
> call the boss at 2:00 PM, his time.)
If I were writing an appointment boot, I'd keep everything internally as
GMT. If the user wants to schedule a meeting at noon tomorrow on the
other coast, she'd better know what she means by "noon": her current
local time or the meeting's local time; the software can't decide for
her. The DISPLAY of the dates can be whatever is most useful for the
user: current local time, time according to a geographical location
associated with the event, time according to an arbitrarily selected
timezone, whatever.
--Mark