首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

IntlTimeZone (class)

Introduction

(PHP 5.5.0, PHP 7, PECL >= 3.0.0a1)

Class synopsis

IntlTimeZone {

/* Constants */

const integer DISPLAY_SHORT = 1 ;

const integer DISPLAY_LONG = 2 ;

/* Methods */

代码语言:javascript
复制
public static integer countEquivalentIDs ( string $zoneId )
代码语言:javascript
复制
public static IntlTimeZone createDefault ( void )
代码语言:javascript
复制
public static IntlIterator createEnumeration ([ mixed $countryOrRawOffset ] )
代码语言:javascript
复制
public static IntlTimeZone createTimeZone ( string $zoneId )
代码语言:javascript
复制
public static IntlTimeZone fromDateTimeZone ( DateTimeZone $zoneId )
代码语言:javascript
复制
public static string getCanonicalID ( string $zoneId [, bool &$isSystemID ] )
代码语言:javascript
复制
public string getDisplayName ([ bool $isDaylight [, integer $style [, string $locale ]]] )
代码语言:javascript
复制
public integer getDSTSavings ( void )
代码语言:javascript
复制
public static string getEquivalentID ( string $zoneId , integer $index )
代码语言:javascript
复制
public integer getErrorCode ( void )
代码语言:javascript
复制
public string getErrorMessage ( void )
代码语言:javascript
复制
public static IntlTimeZone getGMT ( void )
代码语言:javascript
复制
public string getID ( void )
代码语言:javascript
复制
public integer getOffset ( float $date , bool $local , integer &$rawOffset , integer &$dstOffset )
代码语言:javascript
复制
public integer getRawOffset ( void )
代码语言:javascript
复制
public static string getTZDataVersion ( void )
代码语言:javascript
复制
public bool hasSameRules ( IntlTimeZone $otherTimeZone )
代码语言:javascript
复制
public DateTimeZone toDateTimeZone ( void )
代码语言:javascript
复制
public bool useDaylightTime ( void )

}

Predefined Constants

IntlTimeZone::DISPLAY_SHORTIntlTimeZone::DISPLAY_LONG

Table of Contents

  • IntlTimeZone::countEquivalentIDs — Get the number of IDs in the equivalency group that includes the given ID
  • IntlTimeZone::createDefault — Create a new copy of the default timezone for this host
  • IntlTimeZone::createEnumeration — Get an enumeration over time zone IDs associated with the given country or offset
  • IntlTimeZone::createTimeZone — Create a timezone object for the given ID
  • IntlTimeZone::fromDateTimeZone — Create a timezone object from DateTimeZone
  • IntlTimeZone::getCanonicalID — Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID
  • IntlTimeZone::getDisplayName — Get a name of this time zone suitable for presentation to the user
  • IntlTimeZone::getDSTSavings — Get the amount of time to be added to local standard time to get local wall clock time
  • IntlTimeZone::getEquivalentID — Get an ID in the equivalency group that includes the given ID
  • IntlTimeZone::getErrorCode — Get last error code on the object
  • IntlTimeZone::getErrorMessage — Get last error message on the object
  • IntlTimeZone::getGMT — Create GMT (UTC) timezone
  • IntlTimeZone::getID — Get timezone ID
  • IntlTimeZone::getOffset — Get the time zone raw and GMT offset for the given moment in time
  • IntlTimeZone::getRawOffset — Get the raw GMT offset (before taking daylight savings time into account
  • IntlTimeZone::getTZDataVersion — Get the timezone data version currently used by ICU
  • IntlTimeZone::hasSameRules — Check if this zone has the same rules and offset as another zone
  • IntlTimeZone::toDateTimeZone — Convert to DateTimeZone object
  • IntlTimeZone::useDaylightTime — Check if this time zone uses daylight savings time

← IntlCalendar::toDateTime

IntlTimeZone::countEquivalentIDs →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com