Intel® Fortran Compiler 16.0 User and Reference Guide

PXFLOCALTIME

POSIX Subroutine: Converts a given elapsed time in seconds to local time.

Module

USE IFPOSIX

CALL PXFLOCALTIME (isecnds,iatime,ierror)

isecnds

(Input) INTEGER(4). The elapsed time in seconds since 00:00:00 Greenwich Mean Time, January 1, 1970.

iatime

(Output) INTEGER(4). One-dimensional array with 9 elements containing numeric time data. The elements of iatime are returned as follows:

Element

Value

iatime(1)

Seconds (0-59)

iatime(2)

Minutes (0-59)

iatime(3)

Hours (0-23)

iatime(4)

Day of month (1-31)

iatime(5)

Month (1-12)

iatime(6)

Gregorian year (for example, 1990)

iatime(7)

Day of week (0-6, where 0 is Sunday)

iatime(8)

Day of year (1-366)

iatime(9)

Daylight savings flag (1 if daylight savings time is in effect; otherwise, 0)

ierror

(Output) INTEGER(4). The error status.

If successful, ierror is set to zero; otherwise, an error code.

The PXFLOCALTIME subroutine converts the time (in seconds since epoch) in the isecnds argument to the local date and time as described by the array iatime above.