Changes for version v0.3.0 - 2026-04-13
- Added GPS coordinate-based timezone resolution to DateTime::Lite::TimeZone::new(). Passing C<latitude> and C<longitude> (decimal degrees) instead of C<name> finds the nearest canonical IANA timezone using the haversine great-circle distance against the reference coordinates stored in the C<zones> table of C<tz.sqlite3> (derived from IANA C<zone1970.tab>). No new dependencies. Note: this is an approximation based on one representative point per zone; it is accurate for most locations but may give incorrect results near timezone boundaries or in enclaves. For more boundary-precise resolution, see L<Geo::Location::TimeZoneFinder>.
- Added private method _nearest_zone() to DateTime::Lite::TimeZone, implementing the haversine query entirely within SQLite via asin(), sqrt(), cos() and sin() functions. Only canonical zones with coordinates are considered.
- Added input validation for latitude (-90..90) and longitude (-180..180), with proper error() returns rather than die().
- Updated DateTime::Lite::TimeZone POD to document the coordinate-based resolution, its approximation caveat, and the valid parameter ranges.
- Added t/14.tz_coordinates.t with 10 subtests covering: Tokyo, Paris, New York, Taipei, Sydney, Buenos Aires (southern hemisphere); integration with DateTime::Lite->now(); and input validation for missing, out-of-range, and non-numeric parameters.
Documentation
Compare DateTime and DateTime::Lite performance
Build the DateTime::Lite::TimeZone SQLite database
Generate leap_seconds.h for DateTime::Lite XS
Modules
Lightweight, low-dependency drop-in replacement for DateTime
Duration objects for use with DateTime::Lite
Exception object for DateTime::Lite
Infinite past and future DateTime::Lite objects
Pure-Perl fallback for the DateTime::Lite XS layer
Lightweight timezone support for DateTime::Lite
Provides
in lib/DateTime/Lite/Infinite.pm
in lib/DateTime/Lite/Infinite.pm
in lib/DateTime/Lite/Infinite.pm
in lib/DateTime/Lite.pm