VMS Help
DECdts, utc_mkasctime
*Conan The Librarian
|
Converts a null-terminated character string that represents an
absolute time to a binary timestamp.
Format
#include <utc.h>
int utc_mkasctime(*utc, *string)
utc_t *utc;
char *string;
Input
string
A null-terminated string that expresses an absolute time.
Output
utc
Resulting binary timestamp.
The Make ASCII Time routine converts a null-terminated string
that represents an absolute time to a binary timestamp.
The ASCII string must be null-terminated.
0 Indicates that the routine executed successfully.
-1 Indicates an invalid time parameter or invalid results.
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:00 I 3600.32");
utc_mkasctime(&utc, /* Out: Binary utc */
str); /* In: String */
utc_ascanytime, utc_ascgmtime, utc_asclocaltime