Server IP : 103.119.228.120 / Your IP : 18.117.188.105 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/ |
Upload File : |
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DateTime::TimeZone 3" .TH DateTime::TimeZone 3 "2016-07-18" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DateTime::TimeZone \- Time zone object base class and factory .SH "VERSION" .IX Header "VERSION" version 2.01 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use DateTime; \& use DateTime::TimeZone; \& \& my $tz = DateTime::TimeZone\->new( name => \*(AqAmerica/Chicago\*(Aq ); \& \& my $dt = DateTime\->now(); \& my $offset = $tz\->offset_for_datetime($dt); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class is the base class for all time zone objects. A time zone is represented internally as a set of observances, each of which describes the offset from \s-1GMT\s0 for a given time period. .PP Note that without the DateTime module, this module does not do much. It's primary interface is through a DateTime object, and most users will not need to directly use \f(CW\*(C`DateTime::TimeZone\*(C'\fR methods. .SS "Special Case Platforms" .IX Subsection "Special Case Platforms" If you are on the Win32 platform, you will want to also install DateTime::TimeZone::Local::Win32. This will enable you to specify a time zone of \f(CW\*(Aqlocal\*(Aq\fR when creating a DateTime object. .PP If you are on \s-1HPUX,\s0 install DateTime::TimeZone::HPUX. This provides support for \s-1HPUX\s0 style time zones like \f(CW\*(AqMET\-1METDST\*(Aq\fR. .SH "USAGE" .IX Header "USAGE" This class has the following methods: .ie n .SS "DateTime::TimeZone\->new( name => $tz_name )" .el .SS "DateTime::TimeZone\->new( name => \f(CW$tz_name\fP )" .IX Subsection "DateTime::TimeZone->new( name => $tz_name )" Given a valid time zone name, this method returns a new time zone blessed into the appropriate subclass. Subclasses are named for the given time zone, so that the time zone \*(L"America/Chicago\*(R" is the DateTime::TimeZone::America::Chicago class. .PP If the name given is a \*(L"link\*(R" name in the Olson database, the object created may have a different name. For example, there is a link from the old \*(L"\s-1EST5EDT\*(R"\s0 name to \*(L"America/New_York\*(R". .PP When loading a time zone from the Olson database, the constructor checks the version of the loaded class to make sure it matches the version of the current DateTime::TimeZone installation. If they do not match it will issue a warning. This is useful because time zone names may fall out of use, but you may have an old module file installed for that time zone. .PP There are also several special values that can be given as names. .PP If the \*(L"name\*(R" parameter is \*(L"floating\*(R", then a \&\f(CW\*(C`DateTime::TimeZone::Floating\*(C'\fR object is returned. A floating time zone does have \fIany\fR offset, and is always the same time. This is useful for calendaring applications, which may need to specify that a given event happens at the same \fIlocal\fR time, regardless of where it occurs. See \s-1RFC 2445\s0 for more details. .PP If the \*(L"name\*(R" parameter is \*(L"\s-1UTC\*(R",\s0 then a \f(CW\*(C`DateTime::TimeZone::UTC\*(C'\fR object is returned. .PP If the \*(L"name\*(R" is an offset string, it is converted to a number, and a \&\f(CW\*(C`DateTime::TimeZone::OffsetOnly\*(C'\fR object is returned. .PP \fIThe \*(L"local\*(R" time zone\fR .IX Subsection "The local time zone" .PP If the \*(L"name\*(R" parameter is \*(L"local\*(R", then the module attempts to determine the local time zone for the system. .PP The method for finding the local zone varies by operating system. See the appropriate module for details of how we check for the local time zone. .IP "\(bu" 4 DateTime::TimeZone::Local::Unix .IP "\(bu" 4 DateTime::TimeZone::Local::Win32 .IP "\(bu" 4 DateTime::TimeZone::Local::VMS .PP If a local time zone is not found, then an exception will be thrown. .ie n .SS "$tz\->offset_for_datetime( $dt )" .el .SS "\f(CW$tz\fP\->offset_for_datetime( \f(CW$dt\fP )" .IX Subsection "$tz->offset_for_datetime( $dt )" Given a \f(CW\*(C`DateTime\*(C'\fR object, this method returns the offset in seconds for the given datetime. This takes into account historical time zone information, as well as Daylight Saving Time. The offset is determined by looking at the object's \s-1UTC\s0 Rata Die days and seconds. .ie n .SS "$tz\->offset_for_local_datetime( $dt )" .el .SS "\f(CW$tz\fP\->offset_for_local_datetime( \f(CW$dt\fP )" .IX Subsection "$tz->offset_for_local_datetime( $dt )" Given a \f(CW\*(C`DateTime\*(C'\fR object, this method returns the offset in seconds for the given datetime. Unlike the previous method, this method uses the local time's Rata Die days and seconds. This should only be done when the corresponding \s-1UTC\s0 time is not yet known, because local times can be ambiguous due to Daylight Saving Time rules. .ie n .SS "$tz\->is_dst_for_datetime( $dt )" .el .SS "\f(CW$tz\fP\->is_dst_for_datetime( \f(CW$dt\fP )" .IX Subsection "$tz->is_dst_for_datetime( $dt )" Given a \f(CW\*(C`DateTime\*(C'\fR object, this method returns true if the DateTime is currently in Daylight Saving Time. .ie n .SS "$tz\->name" .el .SS "\f(CW$tz\fP\->name" .IX Subsection "$tz->name" Returns the name of the time zone. .ie n .SS "$tz\->short_name_for_datetime( $dt )" .el .SS "\f(CW$tz\fP\->short_name_for_datetime( \f(CW$dt\fP )" .IX Subsection "$tz->short_name_for_datetime( $dt )" Given a \f(CW\*(C`DateTime\*(C'\fR object, this method returns the \*(L"short name\*(R" for the current observance and rule this datetime is in. These are names like \*(L"\s-1EST\*(R", \*(L"GMT\*(R",\s0 etc. .PP It is \fBstrongly\fR recommended that you do not rely on these names for anything other than display. These names are not official, and many of them are simply the invention of the Olson database maintainers. Moreover, these names are not unique. For example, there is an \*(L"\s-1EST\*(R"\s0 at both \-0500 and +1000/+1100. .ie n .SS "$tz\->is_floating" .el .SS "\f(CW$tz\fP\->is_floating" .IX Subsection "$tz->is_floating" Returns a boolean indicating whether or not this object represents a floating time zone, as defined by \s-1RFC 2445.\s0 .ie n .SS "$tz\->is_utc" .el .SS "\f(CW$tz\fP\->is_utc" .IX Subsection "$tz->is_utc" Indicates whether or not this object represents the \s-1UTC \s0(\s-1GMT\s0) time zone. .ie n .SS "$tz\->has_dst_changes" .el .SS "\f(CW$tz\fP\->has_dst_changes" .IX Subsection "$tz->has_dst_changes" Indicates whether or not this zone has \fIever\fR had a change to and from \s-1DST,\s0 either in the past or future. .ie n .SS "$tz\->is_olson" .el .SS "\f(CW$tz\fP\->is_olson" .IX Subsection "$tz->is_olson" Returns true if the time zone is a named time zone from the Olson database. .ie n .SS "$tz\->category" .el .SS "\f(CW$tz\fP\->category" .IX Subsection "$tz->category" Returns the part of the time zone name before the first slash. For example, the \*(L"America/Chicago\*(R" time zone would return \*(L"America\*(R". .SS "DateTime::TimeZone\->is_valid_name($name)" .IX Subsection "DateTime::TimeZone->is_valid_name($name)" Given a string, this method returns a boolean value indicating whether or not the string is a valid time zone name. If you are using \&\f(CW\*(C`DateTime::TimeZone::Alias\*(C'\fR, any aliases you've created will be valid. .SS "DateTime::TimeZone\->all_names" .IX Subsection "DateTime::TimeZone->all_names" This returns a pre-sorted list of all the time zone names. This list does not include link names. In scalar context, it returns an array reference, while in list context it returns an array. .SS "DateTime::TimeZone\->categories" .IX Subsection "DateTime::TimeZone->categories" This returns a list of all time zone categories. In scalar context, it returns an array reference, while in list context it returns an array. .SS "DateTime::TimeZone\->links" .IX Subsection "DateTime::TimeZone->links" This returns a hash of all time zone links, where the keys are the old, deprecated names, and the values are the new names. In scalar context, it returns a hash reference, while in list context it returns a hash. .ie n .SS "DateTime::TimeZone\->names_in_category( $category )" .el .SS "DateTime::TimeZone\->names_in_category( \f(CW$category\fP )" .IX Subsection "DateTime::TimeZone->names_in_category( $category )" Given a valid category, this method returns a list of the names in that category, without the category portion. So the list for the \&\*(L"America\*(R" category would include the strings \*(L"Chicago\*(R", \&\*(L"Kentucky/Monticello\*(R", and \*(L"New_York\*(R". In scalar context, it returns an array reference, while in list context it returns an array. .SS "DateTime::TimeZone\->\fIcountries()\fP" .IX Subsection "DateTime::TimeZone->countries()" Returns a sorted list of all the valid country codes (in lower-case) which can be passed to \f(CW\*(C`names_in_country()\*(C'\fR. In scalar context, it returns an array reference, while in list context it returns an array. .PP If you need to convert country codes to names or vice versa you can use \f(CW\*(C`Locale::Country\*(C'\fR to do so. .ie n .SS "DateTime::TimeZone\->names_in_country( $country_code )" .el .SS "DateTime::TimeZone\->names_in_country( \f(CW$country_code\fP )" .IX Subsection "DateTime::TimeZone->names_in_country( $country_code )" Given a two-letter \s-1ISO3166\s0 country code, this method returns a list of time zones used in that country. The country code may be of any case. In scalar context, it returns an array reference, while in list context it returns an array. .PP This list is returned in an order vaguely based on geography and population. In general, the least used zones come last, but there are not guarantees of a specific order from one release to the next. This order is probably the best option for presenting zones names to end users. .ie n .SS "DateTime::TimeZone\->offset_as_seconds( $offset )" .el .SS "DateTime::TimeZone\->offset_as_seconds( \f(CW$offset\fP )" .IX Subsection "DateTime::TimeZone->offset_as_seconds( $offset )" Given an offset as a string, this returns the number of seconds represented by the offset as a positive or negative number. Returns \&\f(CW\*(C`undef\*(C'\fR if \f(CW$offset\fR is not in the range \f(CW\*(C`\-99:59:59\*(C'\fR to \f(CW\*(C`+99:59:59\*(C'\fR. .PP The offset is expected to match either \&\f(CW\*(C`/^([\e+\e\-])?(\ed\ed?):(\ed\ed)(?::(\ed\ed))?$/\*(C'\fR or \&\f(CW\*(C`/^([\e+\e\-])?(\ed\ed)(\ed\ed)(\ed\ed)?$/\*(C'\fR. If it doesn't match either of these, \f(CW\*(C`undef\*(C'\fR will be returned. .PP This means that if you want to specify hours as a single digit, then each element of the offset must be separated by a colon (:). .ie n .SS "DateTime::TimeZone\->offset_as_string( $offset )" .el .SS "DateTime::TimeZone\->offset_as_string( \f(CW$offset\fP )" .IX Subsection "DateTime::TimeZone->offset_as_string( $offset )" Given an offset as a number, this returns the offset as a string. Returns \f(CW\*(C`undef\*(C'\fR if \f(CW$offset\fR is not in the range \f(CW\*(C`\-359999\*(C'\fR to \f(CW359999\fR. .SS "Storable Hooks" .IX Subsection "Storable Hooks" This module provides freeze and thaw hooks for \f(CW\*(C`Storable\*(C'\fR so that the huge data structures for Olson time zones are not actually stored in the serialized structure. .PP If you subclass \f(CW\*(C`DateTime::TimeZone\*(C'\fR, you will inherit its hooks, which may not work for your module, so please test the interaction of your module with Storable. .SH "DONATIONS" .IX Header "DONATIONS" If you'd like to thank me for the work I've done on this module, please consider making a \*(L"donation\*(R" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. .PP Please note that \fBI am not suggesting that you must do this\fR in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. .PP Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time, which seems unlikely at best. .PP To donate, log into PayPal and send money to autarch@urth.org or use the button on this page: <http://www.urth.org/~autarch/fs\-donation.html> .SH "CREDITS" .IX Header "CREDITS" This module was inspired by Jesse Vincent's work on Date::ICal::Timezone, and written with much help from the datetime@perl.org list. .SH "SEE ALSO" .IX Header "SEE ALSO" datetime@perl.org mailing list .PP http://datetime.perl.org/ .PP The tools directory of the DateTime::TimeZone distribution includes two scripts that may be of interest to some people. They are parse_olson and tests_from_zdump. Please run them with the \-\-help flag to see what they can be used for. .SH "SUPPORT" .IX Header "SUPPORT" Support for this module is provided via the datetime@perl.org email list. See http://datetime.perl.org/wiki/datetime/page/Mailing_List for details. .PP Please submit bugs to the \s-1CPAN RT\s0 system at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=datetime%3A%3Atimezone or via email at bug\-datetime\-timezone@rt.cpan.org. .PP Bugs may be submitted through the \s-1RT\s0 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>). .PP I am also usually active on \s-1IRC\s0 as 'drolsky' on \f(CW\*(C`irc://irc.perl.org\*(C'\fR. .SH "DONATIONS" .IX Header "DONATIONS" If you'd like to thank me for the work I've done on this module, please consider making a \*(L"donation\*(R" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. .PP Please note that \fBI am not suggesting that you must do this\fR in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. .PP Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time (let's all have a chuckle at that together). .PP To donate, log into PayPal and send money to autarch@urth.org, or use the button at <http://www.urth.org/~autarch/fs\-donation.html>. .SH "AUTHOR" .IX Header "AUTHOR" Dave Rolsky <autarch@urth.org> .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" .IP "\(bu" 4 Alexey Molchanov <alexey.molchanov@gmail.com> .IP "\(bu" 4 Alfie John <alfiej@fastmail.fm> .IP "\(bu" 4 Bron Gondwana <brong@fastmail.fm> .IP "\(bu" 4 Daisuke Maki <dmaki@cpan.org> .IP "\(bu" 4 David Pinkowitz <dave@pinkowitz.com> .IP "\(bu" 4 Iain Truskett <deceased> .IP "\(bu" 4 Joshua Hoblitt <jhoblitt@cpan.org> .IP "\(bu" 4 Karen Etheridge <ether@cpan.org> .IP "\(bu" 4 karupanerura <karupa@cpan.org> .IP "\(bu" 4 Olaf Alders <olaf@wundersolutions.com> .IP "\(bu" 4 Peter Rabbitson <ribasushi@cpan.org> .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2016 by Dave Rolsky. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.