aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique d'Humieres <dominiq@lps.ens.fr>2016-12-18 19:03:36 +0100
committerDominique d'Humieres <dominiq@gcc.gnu.org>2016-12-18 19:03:36 +0100
commit1feb2bedae8ea44835043ee2ac41c0cc7ecc80f4 (patch)
tree9d71fa06124e45fd7a11801b327484521a66a4a1
parent707024b2e8d74c4a810ba7d2bda5ecd6556d2140 (diff)
downloadgcc-1feb2bedae8ea44835043ee2ac41c0cc7ecc80f4.zip
gcc-1feb2bedae8ea44835043ee2ac41c0cc7ecc80f4.tar.gz
gcc-1feb2bedae8ea44835043ee2ac41c0cc7ecc80f4.tar.bz2
re PR fortran/78545 (Possible correction to online LTIME documentation)
2016-12-18 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/78545 * intrinsic.texi: Fix documentation for GMTIME and LTIME. * intrinsics/date_and_time.c: Fix comments for GMTIME and LTIME. From-SVN: r243785
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/intrinsic.texi38
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/intrinsics/date_and_time.c8
4 files changed, 43 insertions, 13 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d718a3f..d7ce88f 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-18 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/78545
+ * intrinsic.texi: Fix documentation for GMTIME and LTIME.
+
2016-12-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/78848
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index c253c25..300a938 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -7157,11 +7157,16 @@ See @code{GETPID} for an example.
@table @asis
@item @emph{Description}:
-Given a system time value @var{TIME} (as provided by the @code{TIME8}
+Given a system time value @var{TIME} (as provided by the @code{TIME}
intrinsic), fills @var{VALUES} with values extracted from it appropriate
to the UTC time zone (Universal Coordinated Time, also known in some
countries as GMT, Greenwich Mean Time), using @code{gmtime(3)}.
+This intrinsic routine is provided for backwards compatibility with
+GNU Fortran 77. In new code, programmers should consider the use of
+the @ref{DATE_AND_TIME} intrinsic defined by the Fortran 95
+standard.
+
@item @emph{Standard}:
GNU extension
@@ -7186,11 +7191,11 @@ The elements of @var{VALUES} are assigned as follows:
seconds
@item Minutes after the hour, range 0--59
@item Hours past midnight, range 0--23
-@item Day of month, range 0--31
-@item Number of months since January, range 0--12
+@item Day of month, range 1--31
+@item Number of months since January, range 0--11
@item Years since 1900
@item Number of days since Sunday, range 0--6
-@item Days since January 1
+@item Days since January 1, range 0--365
@item Daylight savings indicator: positive if daylight savings is in
effect, zero if not, and negative if the information is not available.
@end enumerate
@@ -7841,6 +7846,11 @@ current local time. The day (in the range 1-31), month (in the range 1-12),
and year appear in elements 1, 2, and 3 of @var{VALUES}, respectively.
The year has four significant digits.
+This intrinsic routine is provided for backwards compatibility with
+GNU Fortran 77. In new code, programmers should consider the use of
+the @ref{DATE_AND_TIME} intrinsic defined by the Fortran 95
+standard.
+
@item @emph{Standard}:
GNU extension
@@ -8650,11 +8660,16 @@ end program test_nan
@table @asis
@item @emph{Description}:
-@code{IDATE(VALUES)} Fills @var{VALUES} with the numerical values at the
+@code{ITIME(VALUES)} Fills @var{VALUES} with the numerical values at the
current local time. The hour (in the range 1-24), minute (in the range 1-60),
and seconds (in the range 1-60) appear in elements 1, 2, and 3 of @var{VALUES},
respectively.
+This intrinsic routine is provided for backwards compatibility with
+GNU Fortran 77. In new code, programmers should consider the use of
+the @ref{DATE_AND_TIME} intrinsic defined by the Fortran 95
+standard.
+
@item @emph{Standard}:
GNU extension
@@ -9635,10 +9650,15 @@ To stat an open file: @ref{FSTAT}, to stat a file: @ref{STAT}
@table @asis
@item @emph{Description}:
-Given a system time value @var{TIME} (as provided by the @code{TIME8}
+Given a system time value @var{TIME} (as provided by the @code{TIME}
intrinsic), fills @var{VALUES} with values extracted from it appropriate
to the local time zone using @code{localtime(3)}.
+This intrinsic routine is provided for backwards compatibility with
+GNU Fortran 77. In new code, programmers should consider the use of
+the @ref{DATE_AND_TIME} intrinsic defined by the Fortran 95
+standard.
+
@item @emph{Standard}:
GNU extension
@@ -9663,11 +9683,11 @@ The elements of @var{VALUES} are assigned as follows:
seconds
@item Minutes after the hour, range 0--59
@item Hours past midnight, range 0--23
-@item Day of month, range 0--31
-@item Number of months since January, range 0--12
+@item Day of month, range 1--31
+@item Number of months since January, range 0--11
@item Years since 1900
@item Number of days since Sunday, range 0--6
-@item Days since January 1
+@item Days since January 1, range 0--365
@item Daylight savings indicator: positive if daylight savings is in
effect, zero if not, and negative if the information is not available.
@end enumerate
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index bcd8cd3e..a53cc2d 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-18 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/78545
+ * intrinsics/date_and_time.c: Fix comments for GMTIME and LTIME.
+
2016-12-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/78622
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c
index 66bcd6f..5e1f160 100644
--- a/libgfortran/intrinsics/date_and_time.c
+++ b/libgfortran/intrinsics/date_and_time.c
@@ -456,11 +456,11 @@ idate_i8 (gfc_array_i8 *__values)
1. Seconds after the minute, range 0-59 or 0-61 to allow for leap seconds
2. Minutes after the hour, range 0-59
3. Hours past midnight, range 0-23
- 4. Day of month, range 0-31
+ 4. Day of month, range 1-31
5. Number of months since January, range 0-11
6. Years since 1900
7. Number of days since Sunday, range 0-6
- 8. Days since January 1
+ 8. Days since January 1, range 0-365
9. Daylight savings indicator: positive if daylight savings is in effect,
zero if not, and negative if the information isn't available. */
@@ -548,11 +548,11 @@ gmtime_i8 (GFC_INTEGER_8 * t, gfc_array_i8 * tarray)
1. Seconds after the minute, range 0-59 or 0-61 to allow for leap seconds
2. Minutes after the hour, range 0-59
3. Hours past midnight, range 0-23
- 4. Day of month, range 0-31
+ 4. Day of month, range 1-31
5. Number of months since January, range 0-11
6. Years since 1900
7. Number of days since Sunday, range 0-6
- 8. Days since January 1
+ 8. Days since January 1, range 0-365
9. Daylight savings indicator: positive if daylight savings is in effect,
zero if not, and negative if the information isn't available. */