comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada.Calendar.Time_Zones
Date: Mon, 4 Aug 2008 16:57:00 +0200
Date: 2008-08-04T16:57:00+02:00	[thread overview]
Message-ID: <16ap6mkfb9y4f.1nhfjlek1giyb$.dlg@40tude.net> (raw)
In-Reply-To: ee7af051-9fa1-4b69-87db-9db1ea3acc3e@2g2000hsn.googlegroups.com

On Mon, 4 Aug 2008 06:56:56 -0700 (PDT), google1@hafdconsulting.com wrote:

> On Aug 4, 4:31 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> wrote:

>> Does anybody know the meaning of the result returned by UTC_Time_Offset? RM
>> says:
>>
>>    "Returns, as a number of minutes, the difference between the
>> implementation-defined time zone of Calendar, and UTC time, at the time
>> Date."
>>
>> This is ill-defined. Political time has overlapping intervals in presence
>> of daylight saving time, when the clock is adjusted backwards.
> 
> That definition accounts for DST shifts. It says "at the time
> Date," which means that if the date falls into a period where
> the locale is in a DST shift, it will return the DST offset.
> Otherwise, it will return the ST offset.

Consider 1 Oct, 00:30 on the clock. Is it 30 minutes *after* the shift
(already ST) or 30 minutes *before* the shift (still DST)?

> Well I don't think it's a mess. You can convert to UTC or any other
> timezone very easily by changing the offset.

So far, it is unclear how to do this. The same problem has
Ada.Calendar.Arithmetic. When Difference is calculated between two dates
within the overlapping hour there are two results.

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



  reply	other threads:[~2008-08-04 14:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04  9:31 Ada.Calendar.Time_Zones Dmitry A. Kazakov
2008-08-04 13:56 ` Ada.Calendar.Time_Zones google1
2008-08-04 14:57   ` Dmitry A. Kazakov [this message]
2008-08-04 20:56     ` Ada.Calendar.Time_Zones Maciej Sobczak
2008-08-04 22:12 ` Ada.Calendar.Time_Zones Randy Brukardt
2008-08-05  9:10   ` Ada.Calendar.Time_Zones Dmitry A. Kazakov
2008-08-07  2:52     ` Ada.Calendar.Time_Zones Randy Brukardt
2008-08-07  8:27       ` Ada.Calendar.Time_Zones Dmitry A. Kazakov
2008-08-07 22:47         ` Ada.Calendar.Time_Zones Randy Brukardt
2008-08-08  8:48           ` Ada.Calendar.Time_Zones Dmitry A. Kazakov
2008-08-09  2:09             ` Ada.Calendar.Time_Zones Randy Brukardt
2008-08-09  8:04               ` Ada.Calendar.Time_Zones Dmitry A. Kazakov
2008-08-14  0:20                 ` Ada.Calendar.Time_Zones Randy Brukardt
replies disabled

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