Changes for version v0.2.0 - 2026-04-11

  • BCP47 -u-tz- locale extension support: if the locale tag carries a Unicode timezone extension, such as C<he-IL-u-ca-hebrew-tz-jeruslm>, and no explicit C<time_zone> argument is supplied to the constructor, the corresponding IANA canonical timezone name is resolved automatically via C<Locale::Unicode->tz_id2names()>. Explicit C<time_zone> always takes priority. No new dependencies: the BCP47 timezone to Olson canonical timezone resolution uses the static in-memory hash in C<Locale::Unicode>, so no SQLite query, and thus super fast.
  • _set_locale() rewritten: now uses C<Scalar::Util::blessed()> instead of C<ref()> to distinguish objects from unblessed references; This was a carry over from the way DateTime is doing. Returns the C<DateTime::Locale::FromCLDR> object instead of C<undef> to allow the BCP47 timezone resolution in C<_new()>. Unblessed references now return a proper error instead of an undefined behaviour; replaced C<die()> with C<pass_error()> for consistency with the no-die philosophy.
  • Added support for 'local' timezone name in DateTime::Lite::TimeZone::new(). The local timezone is resolved automatically without any external module dependency, using OS-specific detection strategies:
    • Unix/Linux/macOS/FreeBSD/OpenBSD/NetBSD/Solaris/AIX/HP-UX/OS2/Cygwin: $ENV{TZ}, /etc/localtime symlink or binary match, /etc/timezone, /etc/TIMEZONE, /etc/sysconfig/clock, /etc/default/init.
    • Windows (MSWin32, NetWare): $ENV{TZ} then Windows Registry via Win32::TieRegistry (optional, not a hard dependency).
    • Android: $ENV{TZ}, getprop persist.sys.timezone, then 'UTC'.
    • VMS: TZ, SYS$TIMEZONE_RULE, SYS$TIMEZONE_NAME, UCX$TZ, TCPIP$TZ.
    • Symbian, EPOC, MS-DOS, Mac OS 9 and earlier: $ENV{TZ} only.
  • Added OS dispatch aliases for darwin, cygwin, freebsd, openbsd, netbsd, solaris, aix, hpux, os2, netware, symbian, epoc, dos, macos.
  • Updated DateTime::Lite::TimeZone POD to document 'local' resolution strategy per OS.
  • Added t/10.timezone.t subtest for 'local' timezone resolution via $ENV{TZ}.

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