[DB-SIG] DateTime: Changing the time value handling ?!
M.-A. Lemburg
lemburg@uni-duesseldorf.de
Wed, 11 Mar 1998 16:23:38 +0100
Jim Fulton wrote:
>
> Greg Stein (Exchange) wrote:
> >
>
> The ODMG standard includes time zone in it's Time and Timestamp classes.
> They take a fairly minimalist approach. Their time zones are just
> offsets
> from UTC. They leave deciding *what* the offset is (e.g. dealing with
> daylight savings time) to the application.
>
> > I would highly recommend the absolute avoidance of anything that infers /
> > implies time zones within the base data types.
>
> I disagree with this statement, although not entirely. As I have
> said before, I think the Date-Time classes should be based on the
> ODMG standard which provides a *mimimalish*, but useful, treatment
> of time zones.
I think Greg meant the low-level implementation of DateTime objects.
Time zone handling classes can be built on top of the basic types,
though it will certainly not be easy: there is no portable way of
getting the DST start/stop information, since the C API doesn't
export any of this information.
For details on an approach that works on some Unixes, see the
Julian package on www.python.org in the contributed section.
There's also a tzparse.py file in the standard library that relies
on the environment variable TZ.
--
Marc-Andre Lemburg
_______________
DB-SIG - SIG on Tabular Databases in Python
send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
_______________