Skip to content

FindFromTimezoneMap

Some clients add 'X-LIC-LOCATION' with the olson name.

Properties

map

private $map

patterns

private $patterns

Methods

find

public find(string $tzid, bool $failIfUncertain = false): ?\DateTimeZone

Parameters:

Parameter Type Description
$tzid string
$failIfUncertain bool

getTzMaps

This method returns an array of timezone identifiers, that are supported by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers().

private getTzMaps(): array

We're not using DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) because: - It's not supported by some PHP versions as well as HHVM. - It also returns identifiers, that are invalid values for new DateTimeZone() on some PHP versions. (See timezonedata/php-bc.php and timezonedata php-workaround.php)


getTzFromMap

private getTzFromMap(string $tzid): string

Parameters:

Parameter Type Description
$tzid string

hasTzInMap

private hasTzInMap(string $tzid): bool

Parameters:

Parameter Type Description
$tzid string


Automatically generated on 2025-03-18