インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス

CTIME

Portability Function: Converts a system time into a 24-character ASCII string.

Module

USE IFPORT

result = CTIME (stime)

stime

(Input) INTEGER(4). An elapsed time in seconds since 00:00:00 Greenwich mean time, January 1, 1970.

Results

The result is a value in the form Mon Jan 31 04:37:23 1994. Hours are expressed using a 24-hour clock.

The value of stime can be determined by calling the TIME function. CTIME(TIME( )) returns the current time and date.

Example

USE IFPORT
character (24) systime
systime = CTIME (TIME( ))
print *, 'Current date and time is ',systime

See Also