VMS Help  —  DCE  DCE_DTS, Application Routines, utc_asclocaltime
 NAME

   utc_asclocaltime - Converts a binary timestamp to an ASCII string that
                      represents a local time

 SYNOPSIS

   #include <dce/utc.h>

   int utc_asclocaltime( char *cp,
                         size_t stringlen,
                         utc_t *utc );

 PARAMETERS

   Input

   stringlen
        Length of the cp buffer.

   utc  Binary timestamp. Use NULL if you want this routine to use the
        current time for this parameter.

   Output

   cp   ASCII string that represents the time.

 DESCRIPTION

   The utc_asclocaltime() routine converts a binary timestamp to an
   ASCII string that expresses local time.

   The user's environment determines the time zone rule (details are
   system dependent).

   If the user's environment does not specify a time zone rule, the
   system's rule is used (details of the rule are system dependent).
   For example, on OpenVMS systems, the rule pointed to by the filename
   in SYS$SYSTEM:SYS$TIMEZONE_SRC.DAT applies.

 RETURN VALUES

    0    Indicates that the routine executed successfully.

   -1    Indicates an invalid time parameter or invalid results.

 EXAMPLES

   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  */

 RELATED INFORMATION

   Functions: utc_ascanytime
              utc_ascgmtime
Close Help