PHP's bundled timezone database and timelib's lookups over it
(parse_tz.c, parse_posix.c, the abbreviation search of
parse_date.re).
The data is PHP's own (data/timezonedb.bin, extracted from the
timezonedb.h of the PHP version under test by data/timezonedb.py), so
zone names, transitions and abbreviations are PHP's, not the system's.
Contents
use php_std::datetime::tz::Abbreviation;pub struct AbbreviationA row of timelib's abbreviation tables.
use php_std::datetime::tz::Offset;pub struct OffsetWhat timelib_get_time_zone_info reports for an instant.
use php_std::datetime::tz::TzInfo;pub struct TzInfoA timezone identifier resolved against PHP's database.
The name is kept as it was requested (europe/paris stays lowercase), as
timelib does.
Debug, PartialEq.use php_std::datetime::tz::ZoneData;pub struct ZoneDataThe data of one zone (timelib_tzinfo without its name).
use php_std::datetime::tz::abbr_search;pub fn abbr_search(word: &[u8], gmtoffset: i64, isdst: i32) -> Option<Abbreviation>abbr_search: utc/gmt, then the first matching row (or the first
with gmtoffset when it is not -1), then the fallback map by offset
and DST flag.
use php_std::datetime::tz::abbreviations;pub fn abbreviations() -> impl Iterator<Item = Abbreviation>The rows of timezonemap.h (DateTimeZone::listAbbreviations() data).
use php_std::datetime::tz::identifiers;pub fn identifiers() -> impl Iterator<Item = &'static str>timezone_identifiers_list() order: every identifier PHP knows, aliases included.
use php_std::datetime::tz::is_valid_id;pub fn is_valid_id(name: &str) -> booltimelib_timezone_id_is_valid.
use php_std::datetime::tz::strcasecmp;pub fn strcasecmp(a: &[u8], b: &[u8]) -> i32timelib_strcasecmp: ASCII case-insensitive, byte-wise, then by length.
use php_std::datetime::tz::version;pub fn version() -> &'static strtimezone_version_get(): the version of the bundled database.