VMS Help  —  DECdts  utc_ascgmtime
    Converts a binary timestamp to an ASCII string that expresses a
    GMT time.

    Format

      #include <utc.h>

      int utc_ascgmtime(*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 GMT Time routine converts a binary timestamp to an
    ASCII string that expresses a time in GMT.

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 GMT format.

    char   gmTime[UTC_MAX_STR_LEN];

    /*
     *   Convert the current time to ASCII in the following format:
     *
     *          1991-04-01-12:27:38.37I2.00
     */

    utc_ascgmtime(gmTime,                /* 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_asclocaltime
Close Help