comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Inspiration for a better calendar package?
Date: Mon, 15 Dec 2008 14:35:57 +0100
Date: 2008-12-15T14:35:57+01:00	[thread overview]
Message-ID: <1geixp6clszrn$.lotvq9n486uu$.dlg@40tude.net> (raw)
In-Reply-To: gi5hns$tgg$1@heraldo.rediris.es

On Mon, 15 Dec 2008 13:14:48 +0100, m.collado@domain.invalid wrote:

> Dmitry A. Kazakov escribi�:
>> On Mon, 15 Dec 2008 08:45:17 +0100, Wilhelm Spickermann wrote:
>> 
>>> Additionally we should have time zone tables (without leap second
>>> information) for political time (also needing the ability to
>>> specify "unknown") to do conversions between "political text
>>> representations of time" and "wall clock" time. It also contains
>>> the completely predefined time zone "UTC".
>> 
>> I think it can be done much simpler. Conversion to/from political time
>> should simply take time zone offset as the parameter. This is how presently
>> Ada.Calendar.Formatting does. The package Ada.Calendar.Time_Zones already
>> has all tables behind the function UTC_Time_Offset. The only problem is the
>> argument of the function. It must be UTC time instead of political one.
> 
> Things are in fact more complex than that. The "official" or "political" 
> time changes not only with the country, but also with the season, 
> because of daylight savings. And the summer/winter periods change over 
> years for the same country. So we need a complete history record of 
> starting/ending daylight savings periods for each year and each country 
> to correctly compute "political" times from UTC times. And the timezone, 
> or even the calendar of a given country also changes over years.
> 
> As an example of the troubles introduced by a ill-designed time 
> reporting policy, consider the way modern MS-Windows OSs report file 
> timestamps. They suddently change at the last sunday of March and 
> October in european countries. I once had a Modula-2 compiler system 
> that unexpectedly ceased to work (reporting broken installation) after 
> the first winter/summer change when I activated the "Automatic change 
> time with winter/summer time".

Exactly. That is why Ada.Calendar.Time_Zones has to be an optional package
when dealing with time. Presently in order to obtain UTC, we need
Time_Zones (assuming that it weren't broken). That is the world turned
upside down.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2008-12-15 13:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09  9:48 Inspiration for a better calendar package? Jacob Sparre Andersen
2008-12-09 10:15 ` Martin
2008-12-09 11:15   ` Dmitry A. Kazakov
2008-12-09 12:23     ` Martin
2008-12-09 15:16     ` JDECS
2008-12-09 15:44       ` Dmitry A. Kazakov
2008-12-09 17:04         ` JDECS
2008-12-15  7:45     ` Wilhelm Spickermann
2008-12-15  9:00       ` Dmitry A. Kazakov
2008-12-15 12:14         ` m.collado
2008-12-15 13:35           ` Dmitry A. Kazakov [this message]
2008-12-15 12:59         ` Wilhelm Spickermann
2008-12-15 13:46           ` Dmitry A. Kazakov
2008-12-16  0:47             ` sjw
2008-12-16  8:41               ` Dmitry A. Kazakov
2008-12-16 12:08                 ` Georg Bauhaus
2008-12-16  5:50             ` Wilhelm Spickermann
2008-12-16  8:50               ` Dmitry A. Kazakov
2008-12-16 12:23                 ` Georg Bauhaus
2008-12-17  6:16                 ` Wilhelm Spickermann
2008-12-17  8:29                   ` Dmitry A. Kazakov
2008-12-18 21:48                     ` Wilhelm Spickermann
2008-12-19  8:38                       ` Dmitry A. Kazakov
     [not found]           ` <9ImdneCohuZCNdvUnZ2dnUVZ_s3inZ2d@earthlink.com>
2008-12-16  5:13             ` Wilhelm Spickermann
replies disabled

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