utc_anyzone(3dts) — Subroutines
Name
utc_anyzone - 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
tzlenLength of the tzname buffer.
utcBinary timestamp. Use NULL if you want this routine to use the current time for this parameter.
Output
tznameCharacter string that is long enough to hold the time zone label.
tdfLong word with differential in seconds east of GMT.
isdstInteger 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.
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 GMT-n 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.)
Notes
All of the output parameters are optional. No value is returned and no error occurs if the pointer is NULL.
Return Values
0Indicates that the routine executed successfully.
-1Indicates 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).