GMTIME

Portability Subroutine: Returns the Greenwich mean time in an array of time elements.

Module: USE DFPORT

Syntax

CALL GMTIME (stime, tarray)

stime
(Input) Default integer (INTEGER(4) unless changed by the user). Numeric time data to be formatted. Number of seconds since 00:00:00 Greenwich mean time, January 1, 1970.


tarray
(Output) Default integer (INTEGER(4) unless changed by the user). One-dimensional array with 9 elements used to contain numeric time data. The elements of tarray are returned as follows:


Element Value
tarray(1) Seconds (0-59)
tarray(2) Minutes (0-59)
tarray(3) Hours (0-23)
tarray(4) Day of month (1-31)
tarray(5) Month (0-11)
tarray(6) Number of years since 1900
tarray(7) Day of week (0-6, where 0 is Sunday)
tarray(8) Day of year (0-365)
tarray(9) Daylight saving flag (0 if standard time, 1 if daylight saving time)

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: DATE_AND_TIME

Example

use dfport
integer(4) stime, timearray(9)
! initialize stime to number of seconds since
!   00:00:00 GMT January 1, 1970
stime = time()
CALL GMTIME (stime, timearray)
print *, timearray
end