GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATETIME::TIMEZONE::LOCAL::UNIX (3)

.ds Aq ’

NAME

DateTime::TimeZone::Local::Unix - Determine the local system’s time zone on Unix

CONTENTS

VERSION

version 1.97

SYNOPSIS



  my $tz = DateTime::TimeZone->new( name => local );

  my $tz = DateTime::TimeZone::Local->TimeZone();



DESCRIPTION

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

HOW THE TIME ZONE IS DETERMINED

This class tries the following methods of determining the local time zone:
o $ENV{TZ}

It checks $ENV{TZ} for a valid time zone name.

o /etc/localtime

If this file is a symlink to an Olson database time zone file (usually in /usr/share/zoneinfo) then it uses the target file’s path name to determine the time zone name. For example, if the path is /usr/share/zoneinfo/America/Chicago, the time zone is America/Chicago.

Some systems just copy the relevant file to /etc/localtime instead of making a symlink. In this case, we look in /usr/share/zoneinfo for a file that has the same size and content as /etc/localtime to determine the local time zone.

o /etc/timezone

If this file exists, it is read and its contents are used as a time zone name.

o /etc/TIMEZONE

If this file exists, it is opened and we look for a line starting like TZ = .... If this is found, it should indicate a time zone name.

o /etc/sysconfig/clock

If this file exists, it is opened and we look for a line starting like TIMEZONE = ... or ZONE = .... If this is found, it should indicate a time zone name.

o /etc/default/init

If this file exists, it is opened and we look for a line starting like TZ=.... If this is found, it should indicate a time zone name.

SUPPORT

Bugs may be submitted through the RT bug tracker <http://rt.cpan.org/Public/Dist/Display.html?Name=DateTime-TimeZone> (or bug-datetime-timezone@rt.cpan.org <mailto:bug-datetime-timezone@rt.cpan.org>).

I am also usually active on IRC as ’drolsky’ on irc://irc.perl.org.

AUTHOR

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENCE

This software is copyright (c) 2016 by Dave Rolsky.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DATETIME::TIMEZONE::LOCAL::UNIX (3) 2016-03-24

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.