PreviousNext

utc_anyzone(3dts)

Gets the time zone label and offset from GMT

Synopsis

#include <dce/utc.h>

int utc_anyzone(
char *tzname,
size_t
tzlen,
long *
tdf,
int *
isdst,
const utc_t *
utc);

Parameters

Input

tzlen
Length of the tzname buffer.

utc
Binary timestamp. Use NULL if you want this routine to use the current time for this parameter.

Output

tzname
Character string that is long enough to hold the time zone label.

tdf
Longword with differential in seconds east of GMT.

isdst
Integer with a value of 1, indicating that no information is supplied as to whether it is standard time or daylight saving time. A value of 1 is always returned.

Notes
All of the output parameters are optional. No value is returned and no error occurs if the pointer is NULL.

Description
The utc_anyzone( ) routine gets the time zone label and offset from GMT by using the TDF contained in the utc input parameter. The label returned is always of the form GMT+n or GMTn where n is the tdf expressed in hours:minutes. (The label associated with an arbitrary time zone is not known; only the offset is known.)

Return Values
~0 Indicates that the routine executed successfully.

1 Indicates an invalid time argument or an insufficient buffer.

Examples
See the sample program in the utc_anytime(3dts) reference page.

Related Information
Functions:

utc_anytime(3dts)

utc_gmtzone(3dts)

utc_localzone(3dts)