tzset() uses the contents of the environment variable TZ to override the value of the different external variables. The tzset() function is called by getdate() and may also be called by the user.
tzset() scans the contents of the environment variable and assigns the different fields to the respective variable. For example, the setting for Central Europe would be:
MEZ-1MSZ-2,M3.5.0/02:00:00,M10.5.0/03:00:00 .
The meaning is described in the manual "POSIX Basics for Users and System Administrators" [1], section "Local time in POSIX". tzset() changes the values of the external variables timezone , altzone , daylight , and tzname .
The ctime() , localtime() , mktime() , and strftime() functions will also update these external variables as if they had called tzset() . tzset() sets the external variable daylight to 0 if no daylight saving conversion is to be processed for the specified time zone. Otherwise daylight is set to a value != 0. The external variable timezone is set to the difference, in seconds, between Coordinated Universal Time (UTC) and the local standard time.
|