comp.lang.ada
 help / color / mirror / Atom feed
From: dik@cwi.nl (Dik T. Winter)
Subject: Re: Timezone/Daylight Savings time info in CALENDAR for Ada 9X...
Date: 29 Aug 89 00:51:33 GMT	[thread overview]
Message-ID: <8362@boring.cwi.nl> (raw)
In-Reply-To: 20800@sequent.UUCP

In article <20800@sequent.UUCP> paulr@sequent.UUCP (Paul Reger) writes:
 > I was wondering if any extensions to CALENDAR were planned regarding:
 > 
 >     1. Timezones.  Perhaps implement the 'universal time' (whatever it
 > is called, the time that airlines, and satellites use) into the
 > package.  Or maybe have information that will name the 24 time zones
 > in the world and have a function to return what the name of the local
 > time is.
Yup.  Implementing UTC looks fine.  But although there are 24 timezones
according to the US military rules (zones A-Z with some letters omitted),
some countries do not conform to this and their time differs not an
integral number of hours from UTC (some parts of Canada for instance).
Better would be a function that returns the difference of local time
and UTC.
 > 
 >     2. Daylight savings time.  This varies from Country to Country,
 > but it would still be useful for implementations to give this type of
 > information.  (I do not know precisely what I am suggesting an
 > implementation do with this information, but it would be useful
 > nonetheless.)
Also here, DST is very hairy.  Implement a function that returns a
boolean that tells whether DST is in effect, and also tells the
difference between DST and normal time (it has not always been 1
hour everywhere, so it need not be in the future).

An excellent implementation of time routines in C for the Unix
system is done by ADO (A. D. Olson), and can be found in the later
implementations of BSD Unix, and also in many sources archives.  It is
public domain.  It is not possible to do this portably in Ada, because
information regarding DST should be kept in (easy updatable) files
because there are a lot of countries with no  fixed rules.
-- 
dik t. winter, cwi, amsterdam, nederland
INTERNET   : dik@cwi.nl
BITNET/EARN: dik@mcvax

  reply	other threads:[~1989-08-29  0:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-08-28 18:24 Timezone/Daylight Savings time info in CALENDAR for Ada 9X Paul Reger
1989-08-29  0:51 ` Dik T. Winter [this message]
1989-08-31  1:21 ` Christopher J S Vance
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox