date_and_time
- Date:
10-12-2011
NAME
DATE_AND_TIME - Returns data on the real-time clock and date
SYNOPSIS
CALL DATE_AND_TIME ([[DATE=]date]
[,[TIME=]time]
[,[ZONE=]zone]
[,[VALUES=]values])
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran
DESCRIPTION
The DATE_AND_TIME intrinsic subroutine returns data on the real-time clock and date. The time returned is local, but the difference between local time and Coordinated Universal Time (UTC) can be determined. Note that UTC is also known as Greenwich Mean Time.
The DATE_AND_TIME intrinsic subroutine accepts the following arguments:
- date
Must be a scalar of type character. It must be at least 8 characters long to contain the complete value. It is an output argument, and the leftmost 8 characters are set to a value of the form ccyymmdd, where cc is the century, yy is the year within the century, mm is the month within the year, and dd is the day within the month. If there is no date available, date is set to blanks.
- time
Must be a scalar of type character. It must be at least 10 characters long to contain the complete value. It is an output argument, and the leftmost 10 characters are set to a value of the form hhmmss.sss, where hh is the hour of the day, mm is the minutes of the hour, and ss.sss is seconds and milliseconds of the minute. If there is no clock available, time is set to blanks.
- zone
Must be a scalar of type character. It must be at least five characters long to contain the complete value. It is an output argument whose leftmost five characters are set to a value of the form ±hhmm, where hh and mm are the time difference with respect to UTC in hours and parts of an hour expressed in minutes, respectively. If there is no clock available, zone is set to blanks.
- values
Must be of type default integer and of rank one. It is an output argument and must have at least eight elements. The values returned in values are as follows:
- Values
Return Value
- values(1)
The year (that is, 2009), or -HUGE (0) if there is no date available.
- values(2)
The month of the year (1-12), or -HUGE (0) if there is no date available.
- values(3)
The day of the month (1-31), or -HUGE (0) if there is no date available.
- values(4)
The time difference, in minutes, with respect to UTC, or -HUGE (0) if this information is not available.
- values(5)
The hour of the day, in the range of 0 to 23, or -HUGE (0) if there is no clock.
- values(6)
The minutes of the hour, in the range 0 to 59, or -HUGE (0) if there is no clock.
- values(7)
The seconds of the minute, in the range 0 to 60, or -HUGE (0) if there is no clock.
- values(8)
The milliseconds of the second, in the range 0 to 999, or -HUGE (0) if there is no clock.
DATE_AND_TIME is an intrinsic subroutine. The name of this intrinsic cannot be passed as an argument.