# TIME Portability Routine

Portability Function or Subroutine: The function returns the system time, in seconds, since 00:00:00 Greenwich mean time, January 1, 1970. TIME can be used as a portability function or subroutine, or as an intrinsic procedure. It is an intrinsic procedure unless you specify USE IFPORT.

## Module

USE IFPORT

Function Syntax:

result = TIME( )

Subroutine Syntax:

CALL TIME (timestr)

timestr | (Output) Character*(*). Is the current time, based on a 24-hour clock, in the form hh:mm:ss, where hh, mm, and ss are two-digit representations of the current hour, minutes past the hour, and seconds past the minute, respectively.

## Results

The result type is INTEGER(4). The result value is the number of seconds that have elapsed since 00:00:00 Greenwich mean time, January 1, 1970.

The subroutine fills a parameter with the current time as a string in the format hh:mm:ss.

The value returned by this routine can be used as input to other portability date and time functions.

## Example

     USE IFPORT
     INTEGER(4) int_time
     character*8 char_time
     int_time = TIME( )
     call TIME(char_time)
     print *, 'Integer: ', int_time, 'time: ', char_time
     END

Parent topic: T to Z

## See Also

DATE_AND_TIME
TIME intrinsic procedure