VMS Help
DECdts, utc_asclocaltime
*Conan The Librarian
|
Converts a binary timestamp to an ASCII string that represents a
local time.
Format
#include <utc.h>
int utc_asclocaltime(*cp, stringlen, *utc)
char *cp;
size_t stringlen;
const utc_t *utc;
Input
stringlen
Length of the cp buffer.
utc
Binary timestamp.
Output
cp
ASCII string that represents the time.
The ASCII Local Time routine converts a binary timestamp to an
ASCII string that expresses local time.
OpenVMS systems do not have a default time zone rule. You
select a time zone by defining sys$timezone_rule during the
sys$manager:net$configure.com procedure, or by explicitly
defining sys$timezone_rule.
0 Indicates that the routine executed successfully.
-1 Indicates an invalid time parameter or invalid results.
The following example converts the current time to local time.
char localTime[UTC_MAX_STR_LEN];
/*
* Convert the current time...
*/
utc_asclocaltime(localTime, /* Out: Converted time */
UTC_MAX_STR_LEN, /* In: Length of string */
(utc_t*) NULL); /* In: Time to convert */
/* Default is current time */
utc_ascanytime, utc_ascgmtime