Visible to Intel only — GUID: GUID-1BC12D3C-3005-4839-B18D-E78C8F9CC379
Visible to Intel only — GUID: GUID-1BC12D3C-3005-4839-B18D-E78C8F9CC379
LTIME
Portability Subroutine: Returns the components of the local time zone time in a nine-element array.
Module
USE IFPORT
CALL LTIME (time,array)
time |
(Input) INTEGER(4). An elapsed time in seconds since 00:00:00 Greenwich mean time, January 1, 1970. |
||||||||||||||||||||
array |
(Output) INTEGER(4). One-dimensional array with 9 elements to contain local date and time data derived from time. The elements of array are returned as follows:
|
This subroutine is not year-2000 compliant, use DATE_AND_TIME instead.
On Linux* and macOS, time can be a negative number returning the time before 00:00:00 Greenwich mean time, January 1, 1970. On Windows*, time can not be negative, in which case all 9 elements of array are set to -1. On all operating systems, if there is a system error in getting the local time, all 9 elements of array are set to -1.
Example
USE IFPORT
INTEGER(4) input_time, time_array(9)
! find number of seconds since 1/1/70
input_time=TIME()
! convert number of seconds to time array
CALL LTIME (input_time, time_array)
PRINT *, time_array