Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

PACKTIMEQQ

Portability Subroutine: Packs time and date values.

Module

USE IFPORT

CALL PACKTIMEQQ (timedate,iyr,imon,iday,ihr,imin,isec)

timedate

(Output) INTEGER(4). Packed time and date information.

iyr

(Input) INTEGER(2). Year ( xxxxAD).

imon

(Input) INTEGER(2). Month (1 - 12).

iday

(Input) INTEGER(2). Day (1 - 31)

ihr

(Input) INTEGER(2). Hour (0 - 23)

imin

(Input) INTEGER(2). Minute (0 - 59)

isec

(Input) INTEGER(2). Second (0 - 59)

The input values are interpreted as being in the time zone set on the local computer and following the daylight savings rules for that time zone.

The packed time is the number of seconds since 00:00:00 Greenwich mean time, January 1, 1970. Because packed time values can be numerically compared, you can use PACKTIMEQQ to work with relative date and time values. Use UNPACKTIMEQQ to unpack time information. SETFILETIMEQQ uses packed time.

Example

 USE IFPORT
 INTEGER(2) year, month, day, hour, minute, second,   &
            hund
 INTEGER(4) timedate
 CALL GETDAT (year, month, day)
 CALL GETTIM (hour, minute, second, hund)
 CALL PACKTIMEQQ (timedate, year, month, day, hour,   &
                  minute, second)
 END