utc_ascgmtime(3dts)
Converts a binary timestamp to an ASCII string that expresses a GMT time
Synopsis
#include <dce/utc.h> int utc_ascgmtime( char *cp, size_t stringlen,
utc_t *utc);
Parameters
Input
stringlen Length of the cp buffer.
utc Binary timestamp.
Output
cp ASCII string that represents the time.
Description The utc_ascgmtime( ) routine converts a binary timestamp to an ASCII string that expresses a time in GMT.
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 GMT format.
char gmTime[UTC_MAX_STR_LEN]; /* Convert the current time to ASCII in the following format: * 1991-04-01-12:27:38.37I2.00 */
utc_ascgmtime(gmTime, /* 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(3dts)
utc_asclocaltime(3dts)
|