[PYTHON DB-SIG] [comp.lang.python] Date-Time requirements (esp. for databases)

Anthony Baxter Anthony Baxter <arb@connect.com.au>
Wed, 30 Oct 1996 15:09:08 +1100


>>> "W. Craig Trader" wrote
> > [strftime]
> This is good, though it duplicates the existing `time' modules function.

Yes, but can the existing function handle DateTime objects? It shouldn't
have to, a 

> > [arithmetic]
> I think you're wrong here - there should be multiple types:  DateTime, as
> already discussed, and Interval, which would represent a signed quantity
> of a generic unit (ie: 10 minutes or 2 hours or 1 week or 5 years), or 
> possibly a combination.  Math would look like this:

Sounds good to me!

> Since we're talking about databases, the types should try to stick fairly
> close to SQL, and SQL/92 already has provisions for DateTimes and
> Intervals.

If anyone can point me to a good source of info about SQL, it would be
appreciated (online would be even better! :)

> > [timezones]
> Again, I'd want to look towards SQL for this type of problem - the
> theory's probably already been solved - why work hard only to produce
> something that isn't compatible with major databases?  

If SQL does it, and does it _right_, then fine, otherwise, no. Correctness
is more important for my purposes than compatibility with databases (which
are likely to each implement everything slightly differently, anyway :(

> Well, at least South Australia is no longer 1.5 hours off from Queensland.
> That was a *real* lousy system.  Of course, Indiana in the States is the
> worst - it varies county by county.  <sigh>

No, instead we have, at the moment:
Vic, NSW, Tas, Canberra: UTC+11 (Tas, Vic, NSW/ACT all have different start/end
                                times for DST)
QLD: UTC+10  (no DST)
SA: UTC+10.5 (DST, normally 1/2 hour behind Eastern states)
NT: UTC+9.5  (no DST, normally 1/2 hour behind Eastern states)
WA: UTC+8    (no DST, normally 2 hours behind Eastern states)

Currently we don't have any boxes in the Northern Territory (yet :( ) 
but I have to worry about everywhere else. Guess why I care about 
timezones... :-/

I'd imagine places in the US are similarly horrid.

Anthony

=================
DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
=================