From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada.Calendar.Time_Zones
Date: Fri, 8 Aug 2008 10:48:41 +0200
Date: 2008-08-08T10:48:41+02:00 [thread overview]
Message-ID: <aht87sie2uac$.ke09vcui32dj.dlg@40tude.net> (raw)
In-Reply-To: g7fu3e$nt6$1@jacob-sparre.dk
On Thu, 7 Aug 2008 17:47:41 -0500, Randy Brukardt wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
> news:61migfnkb0sm.8wytouvj8o4f.dlg@40tude.net...
> ...
>> But all that stuff like Time_Of etc is not really needed with UTC_Time.
>> The package should provide Clock, +, -, <, <=, >, >=:
>
> I don't see how that could work. How would you display or create a UTC time?
No problem:
T : Ada.UTC_Time.Time := ...;
P : Ada.Calendar.Time := To_Calendar_Time (T);
P is the political time corresponding to T, it is well-defined for each T.
P can be used in Ada.Calendar.Split to display T as:
August 08, 2008 10:18 (Berlin time)
When used in Ada.Calendar.Formatting.Split with
Time_Zone => UTC_Time_Offset (T)
the display could be:
August 08, 2008 09:18 (UTC time)
Creating UTC time from UTC's Y/M/D/S should go as follows:
To_UTC_Time (Ada.Calendar.Formatting.Time_Of (Y/M/D/S, 0), 0);
> Anyway, we should have this discussion on Ada-Comment, where it will get
> recorded and attached to the eventual AI on the topic.
Has the proposal any chance to made it?
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2008-08-08 8:48 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 ` Ada.Calendar.Time_Zones Dmitry A. Kazakov
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 ` Dmitry A. Kazakov [this message]
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