From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada.Calendar.Formatting.Image (or Time_Of) changing the time
Date: Tue, 3 Mar 2020 17:49:31 -0600
Date: 2020-03-03T17:49:31-06:00 [thread overview]
Message-ID: <r3mqee$132$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: lyv9nl8p6w.fsf@pushface.org
"Simon Wright" <simon@pushface.org> wrote in message
news:lyv9nl8p6w.fsf@pushface.org...
...
> There was a conversation on Ada-Comment in June last year, in which it
> turned out that compiler implementers may have have been misinterpreting
> the ARM. It was quite confusing.
Not just a conversation, but also a Binding Interpretation AI (which
therefore applies to Ada 2012 compilers), AI12-0336-1.
Essentially, the formal definition of Time_Offset, and the way it was
actually implemented by every compiler except mine, was completely
different. We decided to match practice, especially as that matches the way
the Internet uses time offsets. So that part of the RM was rewritten.
As Dmitry says, the default Time_Offset on GNAT gives one UTC. If you want
CST or CDT (my time zones, which change on this coming Sunday), one needs to
use -360 or -300. We've added a new renaming Local_Time_Image to make this
relatively easy (dunno if GNAT has it yet).
The advantage of this definition is that the base UTC time doesn't jump
during the year, but if you are interested in local time, you have to
determine the offset based on the time-of-year.
Your example suggests that GNAT is doing something weird with times that are
far away from today. That's certainly not intended, sounds like a bug to me.
Certainly is a bug with the rewritten rules for Time_Image.
Randy.
next prev parent reply other threads:[~2020-03-03 23:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 18:49 Ada.Calendar.Formatting.Image (or Time_Of) changing the time Marius Amado-Alves
2020-03-02 23:08 ` Randy Brukardt
2020-03-03 12:59 ` Marius Amado-Alves
2020-03-03 14:25 ` Dmitry A. Kazakov
2020-03-03 14:53 ` Simon Wright
2020-03-03 17:40 ` Simon Wright
2020-03-03 23:49 ` Randy Brukardt [this message]
2020-03-04 15:19 ` Simon Wright
2020-03-04 22:33 ` Optikos
2020-03-05 16:11 ` Optikos
2020-03-05 23:29 ` Randy Brukardt
2020-03-06 14:42 ` Optikos
2020-03-07 0:19 ` Randy Brukardt
2020-03-07 1:18 ` Optikos
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox