Documentation of LTIME
Janus Weil
janus@gcc.gnu.org
Sat Nov 26 12:17:00 GMT 2016
Hi Francisco,
> In the online documentation of LTIME,
> https://gcc.gnu.org/onlinedocs/gfortran/LTIME.html#LTIME, is written:
>
> Return value:
> The elements of VALUES are assigned as follows:
>
> 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
> 5. Number of months since January, range 0–12
>
> I imagine that range should be 0-30 for 4. and 0-11 for 5.
I image it should be be 1-31 and 1-12, however my test program
indicates it might be 1-31 and 0-11, which is certainly inconsistent:
program p
integer values(9)
call ltime(time(), values)
print *,'time: ',values(3),':',values(2),':',values(1)
print *,'date: ',values(4),'.',values(5),'.',1900+values(6)
print *,values(7)
print *,values(8)
print *,values(9)
end program
This gives me:
date: 26 . 10 . 2016
In any case the documentation is wrong. Could you please open a bug
report in bugzilla for that?
Cheers,
Janus
More information about the Fortran
mailing list