Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ utc_localzone(3dts) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

utc_localzone(3dts)  —  Subroutines

Name

utc_localzone - Gets the local time zone label and offset from GMT, given utc

Synopsis

#include <dce/utc.h> int utc_localzone(
char ∗tzname,
size_t tzlen,
long ∗tdf,
int ∗isdst,
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 long enough to hold the time zone label. 

tdfLong word with differential in seconds east of GMT. 

isdstInteger with a value of 0 (zero) if standard time is in effect or a value of 1 if daylight saving time is in effect. 

Description

The utc_localzone() routine gets the local time zone label and offset from GMT, given utc. 

The user’s environment determines the time zone rule (details are system dependent).  For example, on OSF/1 systems, the user selects a time zone by specifying the TZ environment variable. (The reference information for the localtime() system call, which is described in the ctime(3) reference page, provides additional information.) 

If the user’s environment does not specify a time zone rule, the system’s rule is used (details of the rule are system dependent).  For example, on OSF/1 systems, the rule in /etc/zoneinfo/localtime applies. 

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_gmtzone(3dts) reference page. 

Related Information

Functions: utc_anyzone(3dts), utc_gmtzone(3dts), utc_localtime(3dts). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026