Library /sys$common/syshlp/HELPLIB.HLB  —  DCE  DCE_DTS, Application Routines, utc_mkascreltime
 NAME

   utc_mkascreltime - Converts a NULL-terminated character string that
                      represents a relative timestamp to a binary
                      timestamp

 SYNOPSIS

   #include <dce/utc.h>

   int utc_mkascreltime( utc_t *utc,
                         char *string );

 PARAMETERS

   Input

   string
       A NULL-terminated string that expresses a relative timestamp in
       its ISO format.

   Output

   utc Resulting binary timestamp.

 DESCRIPTION

   The utc_mkascreltime() routine converts a NULL-terminated string,
   which represents a relative timestamp, to a binary timestamp.

 NOTES

   The ASCII string must be NULL-terminated.

 RETURN VALUES

    0    Indicates that the routine executed successfully.

   -1    Indicates an invalid time parameter or invalid results.

 EXAMPLES

   The following example converts an ASCII relative time string to its
   binary equivalent.

        utc_t      utc;
        char       str[UTC_MAX_STR_LEN];

        /*   Relative time of -333 days, 12 hours, 1 minute, 37.223
         *   seconds Inaccuracy of 50.22 seconds in the format:
         *   -333-12:01:37.223I50.22
         */
        (void)strcpy((void *)str, "-333-12:01:37.223I50.22");

        utc_mkascreltime(&utc,   /* Out: Binary utc                 */
                         str);   /* In:  String                     */

 RELATED INFORMATION

   Functions: utc_ascreltime
Close Help