diff options
author | Bob Duff <duff@adacore.com> | 2020-05-08 09:55:36 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-06 07:35:17 -0400 |
commit | 49665da2e51e3e455fa1ed700987b081c4c3af6e (patch) | |
tree | c7146b1a6fcbeeebd74a530789f6c626534c529a /gcc/c | |
parent | e3bf5e2ef3d08a1fac9db2b5f0a1f107b25d67c5 (diff) | |
download | gcc-49665da2e51e3e455fa1ed700987b081c4c3af6e.zip gcc-49665da2e51e3e455fa1ed700987b081c4c3af6e.tar.gz gcc-49665da2e51e3e455fa1ed700987b081c4c3af6e.tar.bz2 |
[Ada] Correct time zone in GNAT.Calendar.Time_IO.Value
gcc/ada/
* libgnat/g-catiio.adb (Parse_ISO_8601): New name for
Parse_ISO_8861_UTC. 8601 is the correct ISO standard number.
Also, "UTC" was confusing. All Time values are represented in
UTC, but the ISO 8601 date strings include a time zone.
If a time zone was specified, call
Ada.Calendar.Formatting.Time_Of instead of
GNAT.Calendar.Time_Of, because the latter adjusts to the current
time zone, whereas we want to use (just) the time zone specified
in the ISO string. This allows us to pass Time_Zone instead to
Time_Of, instead of adjusting by Local_Disp by hand.
If no time zone was specified, call GNAT.Calendar.Time_Of as
before.
Use expanded names to clarify which Time_Of is being called.
Remove redundant comment, and move nonredundant part of the
commment to the spec.
(Value): Minor: use "not in" instead of "or else".
* libgnat/g-catiio.ads: Comment moved here. Correct the ISO
standard number.
* libgnat/g-calend.adb: Add ??? comments.
* libgnat/a-calend.ads, libgnat/a-calend.adb: Update obsolete
comments regarding the representation of type Time. Move the
information about the epoch (year 2150) to the spec, and avoid
uttering "2150" more than once.
* libgnat/a-catizo.ads (Time_Offset): Add comment.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions