From: Joachim Achtzehnter (joachim_at_[hidden])
Date: 2002-04-16 12:37:05
William E. Kempf wrote:
> Bill Seymour wrote:
> > My guess is that most actual applications that need to do /any/
> > arithmetic on dates and times (beyond simple comparisons -
> > and string comparisons work fine with the ISO representation)
> > require calculations across multiple time zones...
> I'm not sure it's actually "most", but I'm not sure that it matters.
> You're arguments are *very* appropriate for a large number of
> applications and should be addressed.
Strongly agree: Dealing with different time zones can be a very
frustrating experience. It is precisely applications that need to do this
that would most benefit from library support. At the very minimum I would
expect full support for one local timezone plus UTC, but multiple
timezones would be a real benefit.
Note also that even for applications that deal with only a single local
timezone a date/time library needs to be aware of the DST situation to
calculate the duration between two time points correctly. Does GDTL handle
What I find a little strange, by the way, is how gregorian and posix
modules are so strictly separated. I would have expected the library to
model date/time as generic concepts and then support different
representations that can be converted into each other. After all, a given
time point can be represented (labeled) in many different ways (as a
time_t, as a Gregorian UTC date/time, a Gregorian date/time local to some
timezone, as a Julian date, as a MJD, more accurately either of the above
can be based on UTC, atomic time, or ephemeris time).
Just for reference, there is an interesting library at the NASA Web site
for conversions between various date/time representations:
This doesn't deal with local times, but converts Gregorian date/time into
various kinds of Julian or MJD representations and back. It does even take
into account leap seconds, by the way.
-- work: joachima_at_[hidden] (http://www.netacquire.com) private: joachim_at_[hidden] (http://www.kraut.ca)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk