GETDTTIME()

Fortran version:

    SUBROUTINE GETDTTIME( JDATE, JTIME )
        INTEGER, INTENT(  OUT) :: JDATE   !  current wall-clock date (YYYYDDD)
        INTEGER, INTENT(  OUT) :: JTIME   !  current wall-clock time (HHMMSS)

C version:

GETDTTIME() is a C routine directly callable from Fortran
    void GETDTTIME( int  * jdate ,
                    int  * jtime ) ;

Summary:

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
    

Preconditions:

#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.

Fortran Usage:

        
    ...
    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
    ...

C Usage:

    ...
    #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 */


Previous: GETDATE

Next: HHMMSS

Up: Date-Time Manipulation Routines

To: Models-3/EDSS I/O API: The Help Pages