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 my $offset_tz = DateTime::TimeZone->new( name => '-0300' );
11
13 This class is used to provide the DateTime::TimeZone API needed by
14 DateTime.pm, but with a fixed offset. An object in this class always
15 returns the same offset as was given in its constructor, regardless of
16 the date.
17
19 This class has the same methods as a real time zone object, but the
20 "category()" method returns undef.
21
22 DateTime::TimeZone::OffsetOnly->new ( offset => $offset )
23
24 The value given to the offset parameter must be a string such as
25 "+0300". Strings will be converted into numbers by the "Date‐
26 Time::TimeZone::offset_as_seconds()" function.
27
28 $tz->offset_for_datetime( $datetime )
29
30 No matter what date is given, the offset provided to the constructor is
31 always used.
32
33 $tz->name()
34
35 $tz->short_name_for_datetime()
36
37 Both of these methods return the offset in string form.
38
40 Dave Rolsky, <autarch@urth.org>
41
43 Copyright (c) 2003-2007 David Rolsky. All rights reserved. This pro‐
44 gram is free software; you can redistribute it and/or modify it under
45 the same terms as Perl itself.
46
47 The full text of the license can be found in the LICENSE file included
48 with this module.
49
50
51
52perl v5.8.8 2007-04-02 DateTime::TimeZone::OffsetOnly(3)