Intel® Fortran Compiler 18.0 Developer Guide and Reference
Intrinsic Subroutine (Generic): Returns character and binary data on the real-time clock and date. Intrinsic subroutines cannot be passed as actual arguments.
CALL DATE_AND_TIME ( [date] [,time] [,zone] [,values] )
date |
(Output; optional) Must be scalar and of type default character; its length must be at least 8 to contain the complete value. Its leftmost 8 characters are set to a value of the form CCYYMMDD, where:
|
||||||||||||||||
time |
(Output; optional) Must be scalar and of type default character; its length must be at least 10 to contain the complete value. Its leftmost 10 characters are set to a value of the form hhmmss.sss, where:
|
||||||||||||||||
zone |
(Output; optional) Must be scalar and of type default character; its length must be at least 5 to contain the complete value. Its leftmost 5 characters are set to a value of the form +hhmm or -hhmm, where hh and mm are the time difference with respect to Coordinated Universal Time (UTC) in hours and parts of an hour expressed in minutes, respectively. UTC is also known as Greenwich Mean Time. |
||||||||||||||||
values |
(Output; optional) Must be of type integer. One-dimensional array with size of at least 8. The values returned in values are as follows:
|
Consider the following example executed on 2000 March 28 at 11:04:14.5:
INTEGER DATE_TIME (8)
CHARACTER (LEN = 12) REAL_CLOCK (3)
CALL DATE_AND_TIME (REAL_CLOCK (1), REAL_CLOCK (2), &
REAL_CLOCK (3), DATE_TIME)
This assigns the value "20000328" to REAL_CLOCK (1), the value "110414.500" to REAL_CLOCK (2), and the value "-0500" to REAL_CLOCK (3). The following values are assigned to DATE_TIME: 2000, 3, 28, -300, 11, 4, 14, and 500.
The following shows another example:
CHARACTER(10) t
CHARACTER(5) z
CALL DATE_AND_TIME(TIME = t, ZONE = z)