DateTime::TimeZone::Local - Online Linux Manual PageSection : 3
Updated : 2022-03-24
Source : perl v5.34.0
Note : User Contributed Perl Documentation
NAMEDateTime::TimeZone::Local − Determine the local system's time zone
VERSIONversion 2.52
SYNOPSIS my $tz = DateTime::TimeZone−>new( name => 'local' );
my $tz = DateTime::TimeZone::Local−>TimeZone();
DESCRIPTIONThis module provides an interface for determining the local system's time zone. Most of the functionality for doing this is in OS-specific subclasses.
USAGEThis class provides the following methods:
DateTime::TimeZone::Local−>TimeZone()This attempts to load an appropriate subclass and asks it to find the local time zone. This method is called by when you pass ‟local” as the time zone name to DateTime:TimeZone−>new(). If your OS is not explicitly handled, you can create a module with a name of the form DateTime::TimeZone::Local::$^O. If it exists, it will be used instead of falling back to the Unix subclass. If no OS-specific module exists, we fall back to using the Unix subclass. See DateTime::TimeZone::Local::Unix, DateTime::TimeZone::Local::Android, DateTime::TimeZone::Local::hpux, DateTime::TimeZone::Local::Win32, and DateTime::TimeZone::Local::VMS for OS-specific details.
SUBCLASSINGIf you want to make a new OS-specific subclass, there are several methods provided by this module you should know about.
$class−>Methods()This method should be provided by your class. It should provide a list of methods that will be called to try to determine the local time zone. Each of these methods is expected to return a new DateTime::TimeZone object if it can successfully determine the time zone.
$class−>FromEnv()This method tries to find a valid time zone in an %ENV value. It calls $class−>EnvVars() to determine which keys to look at. To use this from a subclass, simply return ‟FromEnv” as one of the items from $class−>Methods().
$class−>EnvVars()This method should be provided by your subclass. It should return a list of env vars to be checked by $class−>FromEnv(). Your class should always include the TZ key as one of the variables to check.
$class−>_IsValidName($name)Given a possible time zone name, this returns a boolean indicating whether or not the name looks valid. It always return false for ‟local” in order to avoid infinite loops.
EXAMPLE SUBCLASSHere is a simple example subclass: package DateTime::TimeZone::SomeOS;
use strict;
use warnings;
use base 'DateTime::TimeZone::Local';
sub Methods { qw( FromEnv FromEther ) }
sub EnvVars { qw( TZ ZONE ) }
sub FromEther
{
my $class = shift;
...
}
SUPPORTBugs may be submitted at <https://github.com/houseabsolute/DateTime−TimeZone/issues>.
SOURCEThe source code repository for DateTime-TimeZone can be found at <https://github.com/houseabsolute/DateTime−TimeZone>.
AUTHORDave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSEThis software is copyright (c) 2022 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. The full text of the license can be found in the LICENSE file included with this distribution. 0
Johanes Gumabo
Data Size : 11,841 byte
man-DateTime::TimeZone::Local.3pmBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 199,777
Visitor ID : :
Visitor IP : 3.141.46.108 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|DateTime::TimeZone::Local.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|DateTime::TimeZone::Local.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|DateTime::TimeZone::Local.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|149|DateTime::TimeZone::Local.3pm|43|'br══─}─══ |'br══─}─══
)