TimeZone

php\time\TimeZone

Class TimeZone, Immutable

Methods


__construct($rawOffset, $ID, $options = null)
Parameters:
  • $rawOffsetint
  • $IDstring
  • $optionsarray
Returns:

php\time\TimeZone

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:
  • $IDstring - code of timezone, e.g.: ‘UTC’
Returns:

php\time\TimeZone

static setDefault($zone, $globally = false)

Set default time zone for Time objects, by default - the default timezone is UTC

Parameters:
static getDefault($globally = false)

Get default timezone

Parameters:
  • $globallybool - if false - only for the current environment
Returns:

php\time\TimeZone

static getAvailableIDs($rawOffset = null)

Returns all available ids of timezones

Parameters:
  • $rawOffsetint, null
Returns:

string[]