[DB-SIG] DateTime: Changing the time value handling ?!
Wed, 11 Mar 1998 18:14:45 +0100
Jim Fulton wrote:
> I think that the low-level data structure should store
> an *offset from UTC*. I thik that determination and interpretation
> of the offset should be left to the application. Of course,
> applications that don't care about the offset could ignore it.
> In my implementation of the ODMG Date, Time, Timestamp, and Interval
> classes (currently a low-priority project of mine), dates and
> times are stored as local time and an offset. Since the offset
> is optional, applications can ignore it, but it can be obtained by
> apps that care and is used in date-time arithmetic. I don't worry
> about "ticks" in my implementation, as I store date/time components
> directly, rather than as offsets from some time.
You'll have to worry about ticks and COM dates as soon as you
have a need to interface to them. Even worse, rounding becomes
a real problem too...
When dealing with different time zones its better to have a
set of specialized functions/classes. Time zone information
is usually not stored together with date/time values. Most
databases only work with broken down values and have no idea
of the time zone the given values apply to. (And that's what
I wrote the DateTime package for after all: to interface to
DB-SIG - SIG on Tabular Databases in Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org