Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / DateTime / TimeZone / UTC.pm
1 package DateTime::TimeZone::UTC;
2
3 use strict;
4
5 use vars qw ($VERSION);
6 $VERSION = 0.01;
7
8 use DateTime::TimeZone;
9 use base 'DateTime::TimeZone';
10
11 sub new
12 {
13     my $class = shift;
14
15     return bless { name => 'UTC' }, $class;
16 }
17
18 sub is_dst_for_datetime { 0 }
19
20 sub offset_for_datetime { 0 }
21 sub offset_for_local_datetime { 0 }
22
23 sub short_name_for_datetime { 'UTC' }
24
25 sub category { undef }
26
27 sub is_utc { 1 }
28
29
30 1;
31
32 __END__
33
34 =head1 NAME
35
36 DateTime::TimeZone::UTC - The UTC time zone
37
38 =head1 SYNOPSIS
39
40   my $utc_tz = DateTime::TimeZone::UTC->new;
41
42 =head1 DESCRIPTION
43
44 This class is used to provide the DateTime::TimeZone API needed by
45 DateTime.pm for the UTC time zone, which is not explicitly included in
46 the Olson time zone database.
47
48 The offset for this object will always be zero.
49
50 =head1 USAGE
51
52 This class has the same methods as a real time zone object, but the
53 C<category()> method returns undef and C<is_utc()> returns true.
54
55 =head1 AUTHOR
56
57 Dave Rolsky, <autarch@urth.org>
58
59 =head1 COPYRIGHT & LICENSE
60
61 Copyright (c) 2003-2008 David Rolsky.  All rights reserved.  This
62 program is free software; you can redistribute it and/or modify it
63 under the same terms as Perl itself.
64
65 The full text of the license can be found in the LICENSE file included
66 with this module.
67
68 =cut