IntlTimeZone::createTimeZoneIDEnumeration

intltz_create_time_zone_id_enumeration

(PHP 5 >= 5.5.0, PHP 7, PHP 8)

IntlTimeZone::createTimeZoneIDEnumeration -- intltz_create_time_zone_id_enumerationObtém uma enumeração a partir de IDs de fuso horário do sistema com as condições de filtro informadas

Descrição

Estilo orientado a objetos (método):

public static IntlTimeZone::createTimeZoneIDEnumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false

Estilo procedural:

intltz_create_time_zone_id_enumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false

Aviso

Esta função não está documentada; apenas a lista de argumentos está disponível.

Parâmetros

type

region

rawOffset

Valor Retornado

Retorna um objeto IntlIterator ou false em caso de falha.

add a note

User Contributed Notes 1 note

up
0
mattkyn at gmail dot com
2 years ago
Iterating the return value gives you a a string with the time zone ID (ie "Europe/London" or "Etc/GMT-1")

For the constants to use for the `zoneType` argument, see:
https://github.com/php/php-src/blob/master/ext/intl/timezone/timezone_class.cpp#L419-L421

<?php
IntlTimeZone
::TYPE_ANY // the whole lot, including aliases like "CST"
IntlTimeZone::TYPE_CANONICAL // the canonical IDs (no aliases)
IntlTimeZone::TYPE_CANONICAL_LOCATION // only IDs for locations (no "Etc/GMT-1")
?>
To Top