daylight, timezone, tzname

global variables containing time zone information 

Global Variables


#include <time.h>

extern int daylight;

extern long timezone;

extern char *tzname[];


Inclusion of the <time.h> header file provides for definitions of daylight, timezone and tzname as shown in the SYNOPSIS section. The daylight variable is set to 0 if Daylight Savings Time conversions should never be applied for the time zone in use; otherwise it is non-zero. The variable timezone is set to the difference, in seconds, between Coordinated Universal Time (UTC) and local standard time. The variable tzname is an array of two character strings. The first element is the name of the standard time zone (for example, Eastern Standard Time), and the second is the name of the alternate time zone, if one exists (for example, Eastern Daylight Time).

These variables are set initially when the process starts, and are updated whenever the tzset() function is called.

Programs should obtain these definitions by the inclusion of <time.h>. The practice of defining the variables in a program such as

extern char *tzname[];

(without including <time.h>) is unsupported.




PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition



PTC MKS Toolkit 10.3 Documentation Build 39.