Description: | Returns character data on the real-time clock and date in a form compatible with the representations defined in Standard ISO 8601:1988. | ||
Class: | Subroutine | ||
Arguments: | There are four optional arguments1: | ||
DATE (opt) | 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 (opt) | 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 (opt) | 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, where hh and mm are the time difference with respect to Coordinated Universal Time (UTC)2 in hours and parts of an hour expressed in minutes, respectively. | ||
VALUES (opt) | Must be of type default
integer and of rank one. Its size must be at least 8. The values
returned in VALUES are as follows:
| ||
1 All are INTENT(OUT) arguments. (See
Section 5.10.)
2 UTC (also known as Greenwich Mean Time) is defined by CCIR Recommendation 460-2. 3 In local time. |
Examples
Consider the following example executed 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.