https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98507
Bug ID: 98507
Summary: timezone is incorrect on last day of year for "TZ"
hours
Product: gcc
Version: 8.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: urbanjost at comcast dot net
Target Milestone: ---
Created attachment 49870
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49870&action=edit
call date_and_time and print timezone
On the last day of the year if your timezone is not GMT the timezone value
returned by the intrinsic DATE_AND_TIME is incorrect until the local date is
the first of the year.
That is, from 9PM till midnight on the 2020-12-31 a huge timezone value was
returned that was actually a year off in minutes. On a Red Hat 8 machine this
can be duplicate by setting the system time to 2200 (10PM) on 2020-12-31.
date
/home/urbanjs/venus/V600/bin/Linux_gfortran/bug
date 123122002020.00
/home/urbanjs/venus/V600/bin/Linux_gfortran/bug
exit
Sun Jan 3 21:07:57 EST 2021
2021 1 3 -300 21 7 57 208
-0500
2021 1 3 -300 21 7 57 208
Thu Dec 31 22:00:00 EST 2020
2020 12 31***** 22 0 0 20
+8779
2020 12 31***** 22 0 0 20
Thu Dec 31 22:00:00 EST 2020
2020 12 31 526740 22 0 0
13
+8779
2020 12 31 526740 22 0 0
13
So in the EST timezone it is only incorrect during the last five hours of the
year.