date_and_time(3I)
DATE_AND_TIME - Returns data on the real-time clock and date
As shipped in IRIX 6.5.15. Last changed in IRIX 6.5.5.
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 UNICOS, UNICOS/mk, IRIX systems CF90, MIPSpro 7 Fortran 90 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 5 characters long to contain the complete value. It is an output argument whose leftmost 5 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 8 elements. The values returned in values are as follows: Values Return Value values(1) The year (that is, 1990), 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. EXAMPLES The following program uses the DATE_AND_TIME intrinsic subroutine: INTEGER date_time(8) CHARACTER(LEN=10) big_ben(3) CALL DATE_AND_TIME(big_ben(1), big_ben(2), big_ben(3), date_time) PRINT *,'date_time array values:' PRINT *,'year=',date_time(1) PRINT *,'month_of_year=',date_time(2) PRINT *,'day_of_month=',date_time(3) PRINT *,'time difference in minutes=',date_time(4) PRINT *,'hour of day=',date_time(5) PRINT *,'minutes of hour=',date_time(6) PRINT *,'seconds of minute=',date_time(7) PRINT *,'milliseconds of second=',date_time(8) PRINT *, 'DATE=',big_ben(1) PRINT *, 'TIME=',big_ben(2) PRINT *, 'ZONE=',big_ben(3) END When this program was run in Minnesota, USA, on June 1, 1994, at approximately 5:39 PM, on a UNICOS system, it generated the following output: date_time array values: year=1994 month_of_year=6 day_of_month=1 time difference in minutes=360 hour of day=17 minutes of hour=39 seconds of minute=30 milliseconds of second=818 DATE=19940601 TIME=173930.818 ZONE=-0600 When this program was run in Minnesota, USA, on May 2, 1997, at approximately 9:34 AM, on an IRIX system, it generated the following output: date_time array values: year=1997 month_of_year=5 day_of_month=2 time difference in minutes=300 hour of day=9 minutes of hour=34 seconds of minute=39 milliseconds of second=583 DATE=19970502 TIME=093439.583 ZONE=-0500 SEE ALSO Intrinsic Procedures Reference Manual for the printed version of this man page.