ILIAS
Release_4_2_x_branch Revision 61807
|
This class offers methods for timezone handling. More...
Public Member Functions | |
getIdentifier () | |
get identifier | |
switchTZ () | |
Switch timezone to given timezone. | |
restoreTZ () | |
Restore default timezone. | |
validateTZ () | |
validate timezone |
Static Public Member Functions | |
static | _getInstance ($a_tz= '') |
get instance by timezone | |
static | _setDefaultTimeZone ($a_tz) |
set default timezone | |
static | _restoreDefaultTimeZone () |
restore default timezone to server timezone | |
static | _getDefaultTimeZone () |
Calculate and set default time zone. |
Data Fields | |
const | UTC = 'UTC' |
Static Public Attributes | |
static | $instances = array() |
static | $valid_tz = array() |
Static Protected Member Functions | |
static | _switchTimeZone ($a_timezone) |
Switch tz. |
Protected Attributes | |
$log | |
$timezone = "UTC" |
Static Protected Attributes | |
static | $default_timezone = '' |
static | $current_timezone = '' |
static | $server_timezone = '' |
Private Member Functions | |
__construct ($a_timezone) | |
Create new timezone object If no timezone is given, the default server timezone is chosen. |
This class offers methods for timezone handling.
ilTimeZone::_getDefault
tries to "guess" the server timezone in the following manner: 1) PHP >= 5.2.0 use date_default_timezone_get
2) Read ini option date.timezone if available 3) Read environment PHP_TZ 4) Read environment TZ 5) Use date('T')
6) Use UTC
Definition at line 43 of file class.ilTimeZone.php.
|
private |
Create new timezone object If no timezone is given, the default server timezone is chosen.
private
string | valid timezone |
Definition at line 65 of file class.ilTimeZone.php.
References $ilLog, and _getDefaultTimeZone().
|
static |
Calculate and set default time zone.
public
Definition at line 277 of file class.ilTimeZone.php.
References $default_timezone, and UTC.
Referenced by ilSoapInstallationInfoXMLWriter\__buildClient(), __construct(), _getInstance(), _setDefaultTimeZone(), ilObjCalendarSettingsGUI\initFormSettings(), and ilCalendarSettings\read().
|
static |
get instance by timezone
public
string | valid php timezone |
ilTimeZoneException |
Definition at line 111 of file class.ilTimeZone.php.
References $ilLog, $valid_tz, and _getDefaultTimeZone().
Referenced by ilDate\__construct(), ilDateTime\__construct(), ilCalendarRecurrenceCalculator\applyBYMONTHDAYRules(), ilDateTime\get(), ilICalParser\getTZ(), ilICalParser\parse(), ilDateTime\setDate(), ilDateTime\switchTimeZone(), and ilUserImportParser\verifyPref().
|
static |
restore default timezone to server timezone
public
Definition at line 264 of file class.ilTimeZone.php.
References $server_timezone, and _switchTimeZone().
Referenced by ilCalendarRecurrenceCalculator\calculateDateList().
|
static |
set default timezone
public
Definition at line 245 of file class.ilTimeZone.php.
References _getDefaultTimeZone().
Referenced by ilCalendarRecurrenceCalculator\adjustTimeZones().
|
staticprotected |
Switch tz.
public
ilTimeZoneException |
Definition at line 206 of file class.ilTimeZone.php.
References $ilLog.
Referenced by _restoreDefaultTimeZone(), restoreTZ(), and switchTZ().
ilTimeZone::getIdentifier | ( | ) |
ilTimeZone::restoreTZ | ( | ) |
Restore default timezone.
public
Definition at line 168 of file class.ilTimeZone.php.
References _switchTimeZone().
Referenced by validateTZ().
ilTimeZone::switchTZ | ( | ) |
Switch timezone to given timezone.
public
Definition at line 148 of file class.ilTimeZone.php.
References _switchTimeZone().
Referenced by ilICalParser\switchTZ(), and validateTZ().
ilTimeZone::validateTZ | ( | ) |
validate timezone
public
Definition at line 189 of file class.ilTimeZone.php.
References restoreTZ(), and switchTZ().
|
staticprotected |
Definition at line 51 of file class.ilTimeZone.php.
|
staticprotected |
Definition at line 50 of file class.ilTimeZone.php.
Referenced by _getDefaultTimeZone().
|
static |
Definition at line 47 of file class.ilTimeZone.php.
|
protected |
Definition at line 54 of file class.ilTimeZone.php.
|
staticprotected |
Definition at line 52 of file class.ilTimeZone.php.
Referenced by _restoreDefaultTimeZone().
|
protected |
Definition at line 55 of file class.ilTimeZone.php.
Referenced by getIdentifier().
|
static |
Definition at line 48 of file class.ilTimeZone.php.
Referenced by _getInstance().
const ilTimeZone::UTC = 'UTC' |
Definition at line 45 of file class.ilTimeZone.php.
Referenced by ilDate\__construct(), _getDefaultTimeZone(), ilCalendarRecurrenceCalculator\adjustTimeZones(), ilExportFileInfo\create(), ilContainerXmlParser\parseTiming(), ilExportFileInfo\read(), ilDateList\removeByDAY(), ilCalendarEntry\save(), ilCalendarEntry\update(), and ilContainerXmlWriter\writeCourseItemInformation().