Skip to content

Commit 2aa9c9b

Browse files
committed
Merge branch 'mr/jicquel/#50' into 'master'
Do not replace the T delimiter with a space to respect the ISO 8601 norm See merge request eng/toolchain/gnatcoll-core!97
2 parents 1b0ad29 + d28033a commit 2aa9c9b

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/gnatcoll-utils.adb

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -757,21 +757,10 @@ package body GNATCOLL.Utils is
757757
end if;
758758
end loop;
759759

760-
-- In ISO format, the separator between date and time is 'T', whereas
761-
-- GNAT.Calendar.Time_IO expects as space.
762-
763760
declare
764-
S2 : String := Str (First .. Last);
765-
Local : Ada.Calendar.Time;
761+
Local : constant Ada.Calendar.Time :=
762+
GNAT.Calendar.Time_IO.Value (Str (First .. Last));
766763
begin
767-
for S in S2'Range loop
768-
if S2 (S) = 'T' then
769-
S2 (S) := ' ';
770-
exit;
771-
end if;
772-
end loop;
773-
774-
Local := GNAT.Calendar.Time_IO.Value (S2);
775764

776765
-- GNAT.Calendar.Time_IO.Value uses Ada.Calendars.Time_Of, which
777766
-- for GNAT assumes the input date is in the local time zone.

0 commit comments

Comments
 (0)