TimeZone¶
-
php\time\TimeZone
Class TimeZone, Immutable
Methods
__construct
($rawOffset, $ID, $options = null)¶
Parameters:
- $rawOffset – int
- $ID – string
- $options – array
Returns:
getId
()¶Get id of the timezone
Returns: string
getRawOffset
()¶Get raw offset of the timezone
Returns: string
__clone
()¶private
- static
UTC
¶Returns UTC Time zone
Returns: php\time\TimeZone
- static
of
($ID)¶
Parameters:
- $ID – string - code of timezone, e.g.: ‘UTC’
Returns:
- static
setDefault
($zone, $globally = false)¶Set default time zone for Time objects, by default - the default timezone is UTC
Parameters:
- $zone – php\time\TimeZone
- $globally – bool
- static
getDefault
($globally = false)¶Get default timezone
Parameters:
- $globally – bool - if
false
- only for the current environmentReturns:
- static
getAvailableIDs
($rawOffset = null)¶Returns all available ids of timezones
Parameters:
- $rawOffset – int, null
Returns: string[]