Changes for version v0.6.1 - 2026-04-19

  • Fixed _dbh_add_user_defined_functions() in DateTime::Lite::TimeZone to correctly handle SQLite installations where pragma_function_list is unavailable. The previous implementation queried pragma_function_list unconditionally to detect whether SQLite's built-in math functions (sqrt, sin, cos, asin) were compiled in (with the macro 'SQLITE_ENABLE_MATH_FUNCTIONS'). That table-valued pragma is only available since SQLite 3.16.0 (2017-01-02). So, older installations raised the error: "no such table: pragma_function_list" causing t/14.tz_coordinates.t to fail entirely. The detection logic is now version-aware, based on $DBD::SQLite::sqlite_version:
    • SQLite >= 3.35.0 (2021-03-12): pragma_function_list is queried for 'sqrt'. The check runs before any UDF is registered, so a hit is guaranteed to be a native function. A miss means the build omitted -DSQLITE_ENABLE_MATH_FUNCTIONS; Perl UDFs are registered as fallback.
    • SQLite >= 3.16.0 and < 3.35.0: pragma_function_list exists but the math functions cannot be present regardless of the build flags; Perl UDFs are registered unconditionally without querying the pragma.
    • SQLite < 3.16.0: pragma_function_list is not available as a table-valued function, so Perl UDFs are registered unconditionally.
    • UDFs via sqlite_create_function() are available on all SQLite >= 3.0.0, so coordinate-based timezone resolution now works transparently on all supported SQLite versions. Reported via CPAN Testers on Perl 5.20.0, 5.22.2 and 5.24.0 on x86_64-linux (Debian Wheezy, system SQLite < 3.16.0). Thanks to Slaven Rezić for the detailed test reports.
  • Added .gitlab-ci.yml. The pipeline covers Perl 5.10.1 through 5.40 on Linux, plus a dedicated job that builds SQLite 3.15.2 from the official autoconf tarball (the last release before 3.16.0) to ensure the unconditional UDF registration path is exercised in CI.

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