Description:
Convert the value returned by PSX_TIME into a set of usable numbers expressed in GMT, and a
pointer to the corresponding C structure. If GMT is not available, STATUS will be set to
PSX__NOGMT and an error is reported.
Invocation
CALL PSX_GMTIME( NTICKS, SECS, MINS,
HOURS, DAY, MONTH, YEAR,
: WDAY, YDAY, TSTRCT, STATUS )
Arguments
NTICKS = INTEGER (Given)
The number of ticks
since the start of the calendar.
SECS = INTEGER (Returned)
The number of seconds in the current
time.
MINS = INTEGER (Returned)
The number of minutes in the current time.
HOURS =
INTEGER (Returned)
The number of hours in the current time.
DAY = INTEGER (Returned)
The
number of the day of the month.
MONTH = INTEGER (Returned)
The number of the
month in the year.
YEAR = INTEGER (Returned)
The number of the years since 1900.
WDAY = INTEGER (Returned)
The number of the day in the week.
YDAY = INTEGER
(Returned)
The number of the day in the year.
TSTRCT = POINTER (Returned)
A
pointer to the C time structure.
STATUS = INTEGER (Given)
The global status.
Notes:
-
The value of MONTH is 0 for January, 1 for February, etc. This is to maintain compatibility with the C
run time library.
-
The value of YEAR is 0 for 1900, 100 for 2000, 101 for 2001, etc.
-
The value of YDAY is 0 for the first of January, 1 for the second of January, etc. This is to maintain
compatibility with the C run time library.
-
The value of WDAY is 0 for Sunday, 1 for Monday, etc.
-
The pointer TSTRCT points to the C structure that contains the information about the time. This
pointer is needed as it may be passed on to PSX_ASCTIME. The structure will be overwritten by any
future call to PSX_GMTIME or PSX_LOCALTIME.
-
TSTRCT is declared to be of type POINTER. This is usually represented in FORTRAN as an
INTEGER, although any type that uses the same amount of storage would be just as good.
External Routines Used
cnf: cnfFptr, cnfMalloc
References
-
POSIX standard (1988), section 4.2.1
-
ANSI C standard (1989), section 4.12.3.3
Copyright
Copyright (C) 2000 Council for the Central
Laboratory of the Research Councils
Copyright © 2000 Council for the Central Laboratory of the Research Councils, 2006 Particle Physics
and Astronomy Research Council