TimeZone

php\time\TimeZone

Class TimeZone, Immutable

Methods


__construct($rawOffset, $ID, $options = null)
Параметры:
  • $rawOffsetint
  • $IDstring
  • $optionsarray
Результат:

php\time\TimeZone

getId()

Get id of the timezone

Результат:string
getRawOffset()

Get raw offset of the timezone

Результат:string
__clone()

private

static UTC

Returns UTC Time zone

Результат:php\time\TimeZone
static of($ID)
Параметры:
  • $IDstring - code of timezone, e.g.: ‘UTC’
Результат:

php\time\TimeZone

static setDefault($zone, $globally = false)

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

Параметры:
static getDefault($globally = false)

Get default timezone

Параметры:
  • $globallybool - if false - only for the current environment
Результат:

php\time\TimeZone

static getAvailableIDs($rawOffset = null)

Returns all available ids of timezones

Параметры:
  • $rawOffsetint, null
Результат:

string[]