[Python-Dev] proposal: add basic time type to the standardlibrary
Wed, 27 Feb 2002 12:45:17 -0500 (EST)
On Wed, 27 Feb 2002, M.-A. Lemburg wrote:
> True, SQL-92 defines data types "TIME WITH TIME ZONE" and
> "TIMESTAMP WITH TIME ZONE". The standard is only available
> as book, but here's a draft which has all the details:
> Still, only Oracle and PostgreSQL seem to actually implement these
> and ODBC (SQL/CLI), the defacto standard for database interfacing,
> doesn't even provide interfaces to query or store time zone
> information (you can put the information directly in the SQL
> string, but not use it in bound variables).
Strangely enough I use TIMESPAMP WITH TIMEZONE quite a bit on both Oracle
and PostgreSQL using native drivers. I'm also fairly sure that Sybase and
MS-SQL store timestamps with timezone somehow, though my memory on the
project that did so is a little fuzzy.
> Basically, you should not store local time in databases,
> but instead use UTC. If you need the original time zone
> information for reference, you'd keep this in separate
> DB columns (e.g. as strings).
Why not minute offset from UTC like C99?
Anyhow, everyone knows that time zones and daylight savings time are a pain
to deal with. However, lets provide work toward a sane implementation that
can relieve the end-user from having to smack their head against this
particular brick wall every time. (even if it means smacking our collective
heads against the brick wall until we're happy, or reduced to unintelligible
ranting, or possibly both).
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19 E-mail: firstname.lastname@example.org
Fax: (216) 986-0714 WWW: http://www.theopalgroup.com