tzset(3) Library Functions Manual tzset(3) tzset, tzname, timezone, daylight - (libc -lc) #include void tzset(void); extern char *tzname[2]; extern long timezone; extern int daylight; glibc ( feature_test_macros(7)): tzset(): _POSIX_C_SOURCE tzname: _POSIX_C_SOURCE timezone, daylight: _XOPEN_SOURCE || /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE tzset() tzname TZ. . System-V timezone ( UTC) daylight ( 0 ). tzset() "America/New_York" ( ). TZ . tzfile(5) /etc/localtime. ( FILES ). TZ (UTC). TZ . : std offset[dst[offset][,start[/time],end[/time]]] . std . (<) (>) (+) (-) . offset std (UTC). offset . 0 24 00 59: [+|-]hh[:mm[:ss]] dst offset . . start end . : Jn n 1 365. . 29 28 59 1 60. n n 0 365. 29 . Mm.w.d d (0 <= d <= 6) w (1 <= w <= 5) m (1 <= m <= 12). 1 d 5 d. 0 . time . offset [-167, 167] . 02:00:00. (NZST) UTC 12 (NZDT) UTC 13 02:00:00 03:00:00. TZ="NZST-12:00:00NZDT-13:00:00,M9.5.0,M4.1.0/3" -- ""-- : filespec filespec tzfile(5) . filespec '/' . (UTC) filespec UTC TZ . : TZ="Pacific/Auckland" TZ . TZDIR . /etc/localtime . /usr/share/zoneinfo/ . /usr/share/zoneinfo/posixrules TZ /. tzfile(5). Makefile zoneinfo tzfile America/New_York. glibc. attributes(7). +----------------------+------------------------------------+----------------------------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+----------------------------------------------------------------------------------------+ |tzset() | | (MT-Safe) | +----------------------+------------------------------------+----------------------------------------------------------------------------------------+ POSIX.1-2024. tzset() tzname POSIX.1-1988, SVr4, 4.3BSD. timezone daylight POSIX.1-2001 (XSI), SVr4, 4.3BSD. 4.3BSD char *timezone(zone, dst) ( UTC). 0 . tzname timezone daylight tm_gmtoff tm_zone tm(3type). TZ . date(1), gettimeofday(2), time(2), ctime(3), getenv(3), tzfile(5) 3 . . : . 6.18 8 2026 tzset(3)