/sys$common/syshlp/helplib.hlb
DCE_DTS, Application Routines, utc_ascanytime

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

 NAME

   utc_ascanytime - Converts a binary timestamp to an ASCII string that
                    represents an arbitrary time zone

 SYNOPSIS

   #include <dce/utc.h>

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

 PARAMETERS

   Input

   stringlen
       The 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_ascanytime() routine converts a binary timestamp to an ASCII
   string that expresses a time. The TDF component in the timestamp
   determines the local time used in the conversion.

 RETURN VALUES

    0    Indicates that the routine executed successfully.

   -1    Indicates an invalid time parameter or invalid results.

 EXAMPLES

   The following example converts a time to an ASCII string that
   expresses the time in the time zone where the timestamp was
   generated.

        utc_t      evnt;
        char       localTime[UTC_MAX_STR_LEN];

        /*
         *   Assuming that evnt contains the timestamp to convert,
         *   convert the time to ASCII in the following format:
         *
         *          1991-04-01-12:27:38.37-8:00I2.00
         */

        utc_ascanytime(localtime,         /* Out: Converted time    */
                       UTC_MAX_STR_LEN,   /* In:  Length of string  */
                       &evnt);            /* In:  Time to convert   */

 RELATED INFORMATION

   Functions: utc_ascgmtime
              utc_asclocaltime
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.