_daylight, _dstbias, _timezone, and _tzname
_tzname are used in some time and date routines to make local-time adjustments. These global variables have been deprecated for the more secure functional versions, which should be used in place of the global variables.
|Global variable||Functional equivalent|
They are declared in Time.h as follows.
extern int _daylight; extern int _dstbias; extern long _timezone; extern char *_tzname;
On a call to
_tzset, the values of
_tzname are determined from the value of the
TZ environment variable. If you do not explicitly set the value of
_tzname contain the default settings of "PST" and "PDT" respectively. The time-manipulation functions (_tzset, _ftime, and localtime) attempt to set the values of
_timezone by querying the operating system for the default value of each variable. The time-zone global variable values are shown in the following table.
||Nonzero if daylight saving time (DST) zone is specified in
||Offset for daylight saving time.|
||Difference in seconds between coordinated universal time and local time. The default value is 28,800.|
||Time-zone name derived from the
||DST zone name derived from the
Submit and view feedback for