NAME
utc_mkasctime - Converts a NULL-terminated character string that
represents an absolute timestamp to a binary
timestamp
SYNOPSIS
#include <dce/utc.h>
int utc_mkasctime( utc_t *utc,
char *string );
PARAMETERS
Input
string
A NULL-terminated string that expresses an absolute time.
Output
utc Resulting binary timestamp.
DESCRIPTION
The utc_mkasctime() routine converts a NULL-terminated string that
represents an absolute time 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 time string to its binary
equivalent.
utc_t utc;
char str[UTC_MAX_STR_LEN];
/* July 4, 1776, 12:01:37.223 local time
* TDF of -5:00 hours
* Inaccuracy of 3600.32 seconds
*/
(void)strcpy((void *)str,
"1776-07-04-12:01:37.223-5:00I3600.32");
utc_mkasctime(&utc, /* Out: Binary utc */
str); /* In: String */
RELATED INFORMATION
Functions: utc_ascanytime
utc_ascgmtime
utc_asclocaltime