This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/32318] New: GNAT.Calendar.Time_IO "%c" incorrectly claims to be reporting the time zone
- From: "bauhaus at futureapps dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2007 15:26:12 -0000
- Subject: [Bug ada/32318] New: GNAT.Calendar.Time_IO "%c" incorrectly claims to be reporting the time zone
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The spec file explains that the picture "%c" stands for
locale's date and time (including the time zone).
However, the replacement picture doesn't include %z (which
isn't supported AFAICS.)
from the spec:
-- %c locale's date and time (Sat Nov 04 12:02:33 EST 1989)
from the body:
when 'c' =>
case Padding is
when Zero =>
Result := Result & Image (Date, "%a %b %d %T %Y");
$ ./testtime
Wed Jun 13 17:17:41 2007
(This has lead to a time shift when some application, such as a MTA,
interprets the time WRT a different default time zone, such as UTC.)
with GNAT.Calendar.Time_IO;
with Ada.Calendar;
with Ada.Text_IO;
procedure testtime is
begin
Ada.Text_IO.Put_Line
(GNAT.Calendar.Time_IO.Image (Ada.Calendar.Clock, "%c"));
end;
The code is present in trunk, Rev 125413
--
Summary: GNAT.Calendar.Time_IO "%c" incorrectly claims to be
reporting the time zone
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bauhaus at futureapps dot de
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32318