Bitrix API

CTimeZone

Table of Contents

Methods

calculateOffset()  : int
Calculates the difference between local server time and specified timezone in the present moment of time in seconds.
Disable()  : mixed
Enable()  : mixed
Enabled()  : mixed
GetCookieValue()  : null
GetOffset()  : int
getTimezoneOffset()  : int
Returns timezone offset according to global settings.
getTzCookie()  : string|null
GetZones()  : mixed
IsAutoTimeZone()  : mixed
OptionEnabled()  : mixed
SetAutoCookie()  : mixed
SetCookieValue()  : mixed

Methods

calculateOffset()

Calculates the difference between local server time and specified timezone in the present moment of time in seconds.

public static calculateOffset(string $timeZone) : int
Parameters
$timeZone : string
Return values
int

Disable()

public static Disable() : mixed

Enable()

public static Enable() : mixed

Enabled()

public static Enabled() : mixed

GetCookieValue()

public static GetCookieValue() : null

Does nothing.

Return values
null

GetOffset()

public static GetOffset([int|null $USER_ID = null ][, bool $forced = false ]) : int
Parameters
$USER_ID : int|null = null

If USER_ID is set offset is taken from DB

$forced : bool = false

If set, offset is calculated regardless enabling/disabling by functions Enable()/Disable().

Return values
int

getTimezoneOffset()

Returns timezone offset according to global settings.

public static getTimezoneOffset(string $timeZone) : int
Parameters
$timeZone : string
Return values
int

getTzCookie()

public static getTzCookie() : string|null
Return values
string|null

GetZones()

public static GetZones() : mixed

IsAutoTimeZone()

public static IsAutoTimeZone(mixed $autoTimeZone) : mixed
Parameters
$autoTimeZone : mixed

OptionEnabled()

public static OptionEnabled() : mixed

SetAutoCookie()

public static SetAutoCookie() : mixed

SetCookieValue()

public static SetCookieValue(mixed $timezoneOffset) : mixed

Does nothing.

Parameters
$timezoneOffset : mixed

        
On this page

Search results