1DateTime::TimeZone::LocUasle:r:UCnoinxt(r3i)buted Perl DDoactuemTeinmtea:t:iToinmeZone::Local::Unix(3)
2
3
4

NAME

6       DateTime::TimeZone::Local::Unix - Determine the local system's time
7       zone on Unix
8

SYNOPSIS

10         my $tz = DateTime::TimeZone->new( name => 'local' );
11
12         my $tz = DateTime::TimeZone::Local->TimeZone();
13

DESCRIPTION

15       This module provides methods for determining the local time zone on a
16       Unix platform.
17

HOW THE TIME ZONE IS DETERMINED

19       This class tries the following methods of determining the local time
20       zone:
21
22       * $ENV{TZ}
23           It checks $ENV{TZ} for a valid time zone name.
24
25       * /etc/localtime
26           If this file is a symlink to an Olson database time zone file (usu‐
27           ally in /usr/share/zoneinfo) then it uses the target file's path to
28           determine the time zone name.
29
30           If this file is a copy of a zoneinfo file, it looks for a file that
31           matches this file in /usr/share/zoneinfo. If it finds one, it uses
32           that file's path to determine the time zone name.
33
34       * /etc/timezone
35           If this file exists, it is read and its contents are used as a time
36           zone name.
37
38       * /etc/TIMEZONE
39           If this file exists, it is opened and we look for a line starting
40           like "TZ = ...". If this is found, it should indicate a time zone
41           name.
42
43       * /etc/sysconfig/clock
44           If this file exists, it is opened and we look for a line starting
45           like "TIMEZONE = ..." or "ZONE = ...". If this is found, it should
46           indicate a time zone name.
47
48       * /etc/default/init
49           If this file exists, it is opened and we look for a line starting
50           like "TZ=...". If this is found, it should indicate a time zone
51           name.
52

AUTHOR

54       Dave Rolsky, <autarch@urth.org>
55
57       Copyright (c) 2003-2007 David Rolsky.  All rights reserved.  This pro‐
58       gram is free software; you can redistribute it and/or modify it under
59       the same terms as Perl itself.
60
61       The full text of the license can be found in the LICENSE file included
62       with this module.
63
64
65
66perl v5.8.8                       2007-04-02DateTime::TimeZone::Local::Unix(3)
Impressum