1DateTime::TimeZone::OffUsseetrOnCloyn(t3r)ibuted Perl DoDcautmeeTnitmaet:i:oTnimeZone::OffsetOnly(3)
2
3
4
6 DateTime::TimeZone::OffsetOnly - A DateTime::TimeZone object that just
7 contains an offset
8
10 version 1.70
11
13 my $offset_tz = DateTime::TimeZone->new( name => '-0300' );
14
16 This class is used to provide the DateTime::TimeZone API needed by
17 DateTime.pm, but with a fixed offset. An object in this class always
18 returns the same offset as was given in its constructor, regardless of
19 the date.
20
22 This class has the same methods as a real time zone object, but the
23 "category()" method returns undef.
24
25 DateTime::TimeZone::OffsetOnly->new ( offset => $offset )
26 The value given to the offset parameter must be a string such as
27 "+0300". Strings will be converted into numbers by the
28 "DateTime::TimeZone::offset_as_seconds()" function.
29
30 $tz->offset_for_datetime( $datetime )
31 No matter what date is given, the offset provided to the constructor is
32 always used.
33
34 $tz->name()
35 $tz->short_name_for_datetime()
36 Both of these methods return the offset in string form.
37
39 Dave Rolsky <autarch@urth.org>
40
42 This software is copyright (c) 2014 by Dave Rolsky.
43
44 This is free software; you can redistribute it and/or modify it under
45 the same terms as the Perl 5 programming language system itself.
46
47
48
49perl v5.16.3 2014-06-01 DateTime::TimeZone::OffsetOnly(3)