VMS Help
DECdts, utc_gmtime
*Conan The Librarian
|
Converts a binary timestamp to a tm structure that expresses GMT
or the equivalent UTC.
Format
#include <utc.h>
int utc_gmtime(*timetm, *tns, *inacctm, *ins, *utc)
struct tm *timetm;
long *tns;
struct tm *inacctm;
long *ins;
const utc_t *utc;
Input
utc
Binary timestamp to be converted to tm structure components.
Output
timetm
Time component of the binary timestamp.
tns
Nanoseconds since time component of the binary timestamp.
inacctm
Seconds of inaccuracy component of the binary timestamp. If the
inaccuracy is finite, then tm_mday returns a value of -1 and tm_
mon and tm_year return values of zero. The field tm_yday contains
the inaccuracy in days. If the inaccuracy is infinite, all tm
structure fields return values of -1.
ins
Nanoseconds of inaccuracy component of the binary timestamp. If
the inaccuracy is infinite, ins returns a value of -1.
The Greenwich Mean Time (GMT) routine converts a binary timestamp
to a tm structure that expresses GMT (or the equivalent UTC).
Additional returns include nanoseconds since time and nanoseconds
of inaccuracy.
0 Indicates that the routine executed successfully.
-1 Indicates an invalid time argument or invalid results.
See the sample program for the utc_cmpintervaltime routine.
utc_anytime, utc_gmtzone, utc_localtime, utc_mkgmtime