NAME

Astro::App::Satpass2::ParseTime::ISO8601 - Astro::App::Satpass2 minimal ISO-8601 parser

SYNOPSIS

No user-serviceable parts inside.

DETAILS

This class parses ISO-8601 dates. It does not do ordinal days or weeks, but it is rather permissive on punctuation, and permits the convenience dates 'yesterday', 'today', and 'tomorrow'.

This class understands ISO-8601 time zone specifications of the form 'Z', 'UT', 'GMT' and [+-]\d{1,2}:?\d{,2}, but it knows nothing about shifts for summer time. So 2009/7/1 12:00:00 -5 is 5:00 PM GMT, not 4:00 PM. Other zones will be accepted, but may not do what you want. See below.

As an extension to the ISO-8601 standard, years can be followed by an era specification, which is one of 'AD', 'BC', 'BCE', or 'CE' without regard to case. The era indicator may be separated from the year by white space, and be followed by a non-digit separator character.

Unless the era is specified, years less than 70 will have 2000 added, and years at least equal to 70 but less than 100 will have 1900 added.

If DateTime can be loaded, it will be used to get an epoch from the parsed date, including zone.

If DateTime can not be loaded, Time::Local will be used to get an epoch from the parsed date. Time::Local has its own quirks when it sees a year in the distant past. Zones other than UTC, GMT, Z, and numeric offsets will be handled by setting $ENV{TZ} to the specified zone before converting from local time to epoch. If this works for you, fine. If not, tough. You have been warned!

METHODS

This class supports no public methods over and above those documented in its superclass Astro::App::Satpass2::ParseTime.

SUPPORT

Support is by the author. Please file bug reports at https://rt.cpan.org/Public/Dist/Display.html?Name=Astro-App-Satpass2, https://github.com/trwyant/perl-Astro-App-Satpass2/issues, or in electronic mail to the author.

AUTHOR

Thomas R. Wyant, III wyant at cpan dot org

COPYRIGHT AND LICENSE

Copyright (C) 2009-2023 by Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

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.