horde / timezone
Timezone library
v2.0.0RC1
2026-05-25 00:00 UTC
Requires
- php: ^8.1
- horde/date: ^3 || dev-FRAMEWORK_6_0
- horde/exception: ^3 || dev-FRAMEWORK_6_0
- horde/icalendar: ^3 || dev-FRAMEWORK_6_0
- horde/vfs: ^3 || dev-FRAMEWORK_6_0
Requires (Dev)
- pear/archive_tar: ^1.6
- psr/simple-cache: ^1 || ^2 || ^3
Suggests
- ext-phar: *
- pear/archive_tar: *
- psr/simple-cache: ^1 || ^2 || ^3
This package is auto-updated.
Last update: 2026-05-25 09:41:03 UTC
README
Parses the IANA timezone database (Olson format) and generates iCalendar VTIMEZONE components.
Installation
composer require horde/timezone
Quick start
use Horde\Timezone\TimezoneDatabase; use Horde\Timezone\TimezoneDatabaseConfig; $db = new TimezoneDatabase(new TimezoneDatabaseConfig( location: '/path/to/tzdata/', )); echo $db->getZone('America/New_York')->toVtimezone();
The location parameter accepts:
- A directory path containing unpacked Olson source files
- A path to a
.tar.gztarball - A URL to download (default:
ftp://ftp.iana.org/tz/tzdata-latest.tar.gz)
Legacy API
The PSR-0 Horde_Timezone class in lib/ remains available for backward
compatibility. See doc/UPGRADING.md
for migration guidance to the modern Horde\Timezone namespace.
License
LGPL-2.1-only. See LICENSE for details.