HELPLIB.HLB  —  DECdts  utc_gmtime
    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;

1  –  Parameters

    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.

2  –  Description

    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.

3  –  Returns

     0   Indicates that the routine executed successfully.
    -1   Indicates an invalid time argument or invalid results.

4  –  Example

    See the sample program for the utc_cmpintervaltime routine.

5  –  Related Functions

    utc_anytime, utc_gmtzone, utc_localtime, utc_mkgmtime
Close Help