VMS Help  —  DECdts  utc_asclocaltime
    Converts a binary timestamp to an ASCII string that represents a
    local time.

    Format

      #include <utc.h>

      int utc_asclocaltime(*cp, stringlen, *utc)

         char *cp;
         size_t stringlen;
         const utc_t *utc;

1  –  Parameters

    Input

 stringlen

    Length of the cp buffer.

 utc

    Binary timestamp.

    Output

 cp

    ASCII string that represents the time.

2  –  Description

    The ASCII Local Time routine converts a binary timestamp to an
    ASCII string 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.

3  –  Returns

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

4  –  Example

    The following example converts the current time to local time.

    char   localTime[UTC_MAX_STR_LEN];

    /*
     *   Convert the current time...
     */

    utc_asclocaltime(localTime,      /* Out: Converted time          */
                    UTC_MAX_STR_LEN, /* In:  Length of string        */
                    (utc_t*) NULL);  /* In:  Time to convert         */
                                     /*      Default is current time */

5  –  Related Functions

    utc_ascanytime, utc_ascgmtime
Close Help