SUBROUTINE GETDTTIME( JDATE, JTIME )
INTEGER, INTENT( OUT) :: JDATE ! current wall-clock date (YYYYDDD)
INTEGER, INTENT( OUT) :: JTIME ! current wall-clock time (HHMMSS)
void GETDTTIME( int * jdate ,
int * jtime ) ;
Get current date and time from system using UNIX system call time() and put it into standard Models-3-convention date and time representation. For Fortran-90 declarations and interface checking:USE M3UTILIO
#include "iodecl3.h"if called from C.Current date is before 2038, when the UNIX time() system call fails due to integer overflow on 32-bit machines.
...
INTEGER DATENOW, TIMENOW
CALL GETDTTIME( DATENOW, TIMENOW ) ) THEN
C ==> DATENOW:TIMENOW holds the current wall-clock date and time
C stored as integers according to Models-3 conventions;
C DATENOW = 1000 * year + day-number
C TIMENOW = 100 * ( 100 * hour + minute ) + seconds
...
...
#include "iodecl3.h"
...
int datenow, timenow
...
GETDTTIME( &datenow, &timenow )
/* datenow:timenow holds the current wall-clock
date and time, stored according to Models-3
conventions */
Up: Date-Time Manipulation Routines
To: Models-3/EDSS I/O API: The Help Pages