1TZSET(P)                   POSIX Programmer's Manual                  TZSET(P)
2
3
4

NAME

6       daylight, timezone, tzname, tzset - set timezone conversion information
7

SYNOPSIS

9       #include <time.h>
10
11
12
13       extern int daylight;
14       extern long timezone;
15
16
17       extern char *tzname[2];
18       void tzset(void);
19
20

DESCRIPTION

22       The tzset() function shall use the value of the environment variable TZ
23       to set time conversion information used  by  ctime()  ,  localtime()  ,
24       mktime()  ,  and  strftime()  .  If  TZ is absent from the environment,
25       implementation-defined default timezone information shall be used.
26
27       The tzset() function shall set the external variable tzname as follows:
28
29
30              tzname[0] = "std";
31              tzname[1] = "dst";
32
33       where std and dst are as described in the Base  Definitions  volume  of
34       IEEE Std 1003.1-2001, Chapter 8, Environment Variables.
35
36       The tzset() function also shall set the external variable daylight to 0
37       if Daylight Savings Time conversions should never be  applied  for  the
38       timezone  in  use;  otherwise, non-zero. The external variable timezone
39       shall be set to the difference, in seconds, between Coordinated Univerā€
40       sal Time (UTC) and local standard time.
41

RETURN VALUE

43       The tzset() function shall not return a value.
44

ERRORS

46       No errors are defined.
47
48       The following sections are informative.
49

EXAMPLES

51       Example  TZ  variables  and their timezone differences are given in the
52       table below:
53
54                                TZ          timezone
55                                EST5EDT     5*60*60
56                                GMT0        0*60*60
57                                JST-9       -9*60*60
58                                MET-1MEST   -1*60*60
59                                MST7MDT     7*60*60
60                                PST8PDT     8*60*60
61

APPLICATION USAGE

63       None.
64

RATIONALE

66       None.
67

FUTURE DIRECTIONS

69       None.
70

SEE ALSO

72       ctime() , localtime() , mktime() , strftime() ,  the  Base  Definitions
73       volume  of  IEEE Std 1003.1-2001,  Chapter  8,  Environment  Variables,
74       <time.h>
75
77       Portions of this text are reprinted and reproduced in  electronic  form
78       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
79       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
80       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
81       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
82       event of any discrepancy between this version and the original IEEE and
83       The Open Group Standard, the original IEEE and The Open Group  Standard
84       is  the  referee document. The original Standard can be obtained online
85       at http://www.opengroup.org/unix/online.html .
86
87
88
89IEEE/The Open Group                  2003                             TZSET(P)
Impressum