略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: IntlTimeZone::createTimeZoneIDEnumeration

2024-11-14

IntlTimeZone::createTimeZoneIDEnumeration

intltz_create_time_zone_id_enumeration

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

IntlTimeZone::createTimeZoneIDEnumeration -- intltz_create_time_zone_id_enumerationGet an enumeration over system time zone IDs with the given filter conditions

说明

面向对象风格 (method):

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

过程化风格:

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

警告

本函数还未编写文档,仅有参数列表。

参数

type

region

rawOffset

返回值

Returns IntlIterator 或者在失败时返回 false.

add a noteadd a note

User Contributed Notes 1 note

up
0
mattkyn at gmail dot com
3 months 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")
?>

官方地址:https://www.php.net/manual/en/intltimezone.createtimezoneidenumeration.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3