utc.pm

来自「网页留言本,比一般的留言簿管用」· PM 代码 · 共 56 行

PM
56
字号
package DateTime::TimeZone::UTC;use strict;use vars qw ($VERSION);$VERSION = 0.01;use DateTime::TimeZone;use base 'DateTime::TimeZone';sub new{    my $class = shift;    return bless { name => 'UTC' }, $class;}sub is_dst_for_datetime { 0 }sub offset_for_datetime { 0 }sub offset_for_local_datetime { 0 }sub short_name_for_datetime { 'UTC' }sub category { undef }sub is_utc { 1 }1;__END__=head1 NAMEDateTime::TimeZone::UTC - The UTC time zone=head1 SYNOPSIS  my $utc_tz = DateTime::TimeZone::UTC->new;=head1 DESCRIPTIONThis class is used to provide the DateTime::TimeZone API needed byDateTime.pm for the UTC time zone, which is not explicitly included inthe Olson time zone database.The offset for this object will always be zero.=head1 USAGEThis class has the same methods as a real time zone object, but theC<category()> method returns undef and C<is_utc()> returns true.=cut

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?