1package DateTime::TimeZone::UTC;
2
3use strict;
4use warnings;
5use namespace::autoclean;
6
7our $VERSION = '2.51';
8
9use parent 'Class::Singleton', 'DateTime::TimeZone';
10
11sub new {
12    return shift->instance;
13}
14
15## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
16sub _new_instance {
17    my $class = shift;
18
19    return bless { name => 'UTC' }, $class;
20}
21## use critic
22
23sub is_dst_for_datetime {0}
24
25sub offset_for_datetime       {0}
26sub offset_for_local_datetime {0}
27
28sub short_name_for_datetime {'UTC'}
29
30sub category {undef}
31
32sub is_utc {1}
33
341;
35
36# ABSTRACT: The UTC time zone
37
38__END__
39
40=pod
41
42=encoding UTF-8
43
44=head1 NAME
45
46DateTime::TimeZone::UTC - The UTC time zone
47
48=head1 VERSION
49
50version 2.51
51
52=head1 SYNOPSIS
53
54  my $utc_tz = DateTime::TimeZone::UTC->new;
55
56=head1 DESCRIPTION
57
58This class is used to provide the DateTime::TimeZone API needed by
59DateTime.pm for the UTC time zone, which is not explicitly included in
60the Olson time zone database.
61
62The offset for this object will always be zero.
63
64=head1 USAGE
65
66This class has the same methods as a real time zone object, but the
67C<category()> method returns undef and C<is_utc()> returns true.
68
69=head1 SUPPORT
70
71Bugs may be submitted at L<https://github.com/houseabsolute/DateTime-TimeZone/issues>.
72
73=head1 SOURCE
74
75The source code repository for DateTime-TimeZone can be found at L<https://github.com/houseabsolute/DateTime-TimeZone>.
76
77=head1 AUTHOR
78
79Dave Rolsky <autarch@urth.org>
80
81=head1 COPYRIGHT AND LICENSE
82
83This software is copyright (c) 2021 by Dave Rolsky.
84
85This is free software; you can redistribute it and/or modify it under
86the same terms as the Perl 5 programming language system itself.
87
88The full text of the license can be found in the
89F<LICENSE> file included with this distribution.
90
91=cut
92