DateTime-TimeZone-LMT

 view release on metacpan or  search on metacpan

lib/DateTime/TimeZone/LMT.pm  view on Meta::CPAN

Creates an alias that can be called as a string by DateTime methods.

This means you can C<< $dt = DateTime->new( time_zone => 'LMT' ) >> 
or C<< $dt = DateTime->new( time_zone => 'my alias' ) >> rather
than the normal C<< $dt = DateTime->new( time_zone => $lmt ) >>. This is of
little benefit unless you're accepting a time zone name from a user.

If the optional C<$alias_name> is provided then that will be the alias 
created. Otherwise the alias is 'LMT'. Multiple aliases can be created
from the one object.

If the longitude is changed after an alias is created, then the alias 
B<I<WILL NOT CHANGE>>. The alias does not behave as an instance of 
C<DateTime::TimeZone::LMT>.

=back

=head2 Compatability methods

The following methods always return the same value. They exist in order
to make the LMT time zone compatible with the default C<DateTime::TimeZone>
modules.

=over 4

=item * is_floating

Returns false (0) in all circumstances.

=item * is_utc

Returns false (0) in all circumstances.

=item * is_olson

Returns false (0) in all circumstances.

=item * category

Returns 'Solar' in all circumstances.

=back

=head1 Functions

This class also contains the following function:

=over 4

=item * offset_at_longitude( $longitude )

Given a longitude, this method returns a string offset.

=back

=head1 DEPENDENCIES

This module depends on basic DateTime modules: L<DateTime> and L<DateTime::TimeZone>.
It depends also on L<Params::Validate>.

=head1 BUGS AND LIMITATIONS

No known bugs.

=head1 SUPPORT

Support for this module is provided via the datetime@perl.org email
list.  See L<http://lists.perl.org/> for more details.

Please submit bugs to the CPAN RT system at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=datetime%3A%3Atimezone%3A%3Almt>
or via email at bug-datetime-timezone-lmt@rt.cpan.org.

=head1 AUTHOR

Rick Measham <rickm@cpan.org> with parts taken from DateTime::TimeZone
by Dave Rolsky <autarch@urth.org>.

Co-maintainer: Jean Forget (JFORGET at cpan dot org).

=head1 COPYRIGHT

Copyright (C) 2003, 2016 Rick Measham and Jean Forget.  All rights
reserved.  This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself: GNU Public
License version 1 or later and Perl Artistic License.

The full text of the license can be found in the F<LICENSE> file included
with this module or at
L<http://www.perlfoundation.org/artistic_license_1_0> and
L<http://www.gnu.org/licenses/gpl-1.0.html>.

Here is the summary of GPL:

This program is  free software; you can redistribute  it and/or modify
it under the  terms of the GNU General Public  License as published by
the Free  Software Foundation; either  version 1, or (at  your option)
any later version.

This program  is distributed in the  hope that it will  be useful, but
WITHOUT   ANY  WARRANTY;   without  even   the  implied   warranty  of
MERCHANTABILITY  or FITNESS  FOR A  PARTICULAR PURPOSE.   See  the GNU
General Public License for more details.

You  should have received  a copy  of the  GNU General  Public License
along with this program; if not, see <http://www.gnu.org/licenses/> or
write to the Free Software Foundation, Inc., L<http://fsf.org>.

=head1 SEE ALSO

datetime@perl.org mailing list

L<http://datetime.perl.org/>


=cut



( run in 1.833 second using v1.01-cache-2.11-cpan-39bf76dae61 )