Fortran95 subroutine.
call date_and_time(
date,
time,
zone,
values)
Name |
Data type |
Intent |
Description |
date |
character(8) |
out |
Date formatted in 'CCYYMMDD', where CCYY, MM, DD are year, month and date, respectively. |
time |
character(10) |
out |
Time formatted in 'hhmmss.sss', where hh, mm, ss.sss are hour, minute, second. |
zone |
character(5) |
out |
Time difference with UTC formatted in 'hhmm'. |
values |
int4(8) |
out |
Refer the table below. |
Values must be a 1 dimensional array with the size of 8 or greater.
values(1) |
Year (e.g. 2020) |
values(2) |
Month (1~12) |
values(3) |
Date (1~31) |
values(4) |
Time difference with UTC |
values(5) |
Hour (1~23) |
values(6) |
Minutes (1~59) |
values(7) |
Second (0~60) |
values(8) |
Millisecond (0~999) |
It seems strange that values(7) (second) can take 60, but several documents mentions so.