Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2002-04-15 12:47:46


> One thing I noticed after a cursory look at the WIKI docs
> is that civil dates and times seem to be stored as local
> time; and that seems to be causing lots of confusion
> (like the airplane departure and arrival times problem
> mentioned on the WIKI page, "Timezone Adjustment").

The current library offering does not perform any sort of internal conversion. This allows it to
represent both local and UTC dates/times. Of course this allows it to store invalid and ambiguous
local time values for locales that use daylight savings time.

I guess the other thing that needs to be said is that time zone support as described on that Wiki
page is not part of the current library. This page is more of a discussion about how more
sophisticated timezone support might be supported.

> Why not always store civil time as UTC and convert to some
> specified time zone only at I/O time when human-readable
> dates and times are required? Doesn't that make the
> problems go away?

Yes, I would almost always recommend storage of date/times as UTC if multiple time zones are
involved. However, if our application only represents times in a single timezone (say one without
DST) we might have to pay for a lot of unnecessary conversion. Also, there still has to be a way to
convert from UTC to local and back. To documentation / examples of this are at:

http://www.crystalclearsoftware.com/libraries/gdtl/user_docs/local_time_adjust.html

or in the download package.

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk