VMS Help  —  DECdts  utc_localtime
    Converts a binary timestamp to a tm structure that expresses
    local time.

    Format

      #include <utc.h>

      int utc_localtime(*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.

    Output

 timetm

    Time component of the binary timestamp, expressing local time.

 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 Local Time routine converts a binary timestamp to a tm
    structure that expresses local time.

    OpenVMS systems do not have a default time zone rule. You
    select a time zone by defining sys$timezone_rule during the
    sys$manager:net$configure.com procedure, or by explicitly
    defining sys$timezone_rule.

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

5  –  Related Functions

    utc_anytime, utc_gmtime, utc_localzone, utc_mklocaltime
Close Help