[Zope3-dev] Timezone [was, Can we remove ZopeLegacy for now?]

Patrick K. O'Brien pobrien@orbtech.com
Fri, 15 Mar 2002 07:35:47 -0600


While I'm making the case for handling timezone in datetime, I should also
make a case for allowing the suppression of timezone, or an imprecise or
implied timezone. This is related to the arguments for datetime precision
and Martin Fowler makes a good case for this in his Time Point article at
http://martinfowler.com/ap2/timePoint.html.

In particular, he mentions the following:

Another tricky area with time points is how to handle time zones. In a
similar way with precision, there is no right answer for all applications.
Sometimes you'll want a time point with a time zone, sometimes not. A
timepoint without a time zone is perfectly sensible, it means within the
local time of it's context. You find these where further time zone
information is either not useful, or can be obtained from it's context. Be
wary of using time zones when you don't need it.

An example of this problem which was a big irritation to me was in
Microsoft's Outlook. Any appointment times you put in (at least with Outlook
98) were time zone specific. So if I moved time zones and changed the time
on my laptop, the time of the meeting would change (unless I'd thought to
take that into account when putting the time into outlook in the first
place - not a thing most people do.) This was compounded by the fact that if
I picked an all day meeting, it didn't hold the day as a timepoint of day
precision, it picked a Range of timepoints. So an all day meeting I entered
in Boston became one from 11pm to 11pm when I flew to Chicago. What's worse
my WinCE machine only displayed all day meetings to day precision, using the
start of the range, thus moving my all day appointments to the previous day.

In my discussion of Time Point an important feature of time points is that
they are anchored, that is a time zone refers to a particular point on the
timeline. A time object whose value is 2:30pm is not anchored because it
could mean 2.30pm on any day. If the there is a day precision time point to
give context for the 2.30pm, then the 2.30pm, with the day precision time,
represents a (properly anchored) time point.

---
Patrick K. O'Brien
Orbtech