|
static | _validateTimeZone ($timezone) |
| Validate a Timezone name. More...
|
|
static | setTimeZone ($timezone) |
| Set the Default Timezone used for date/time conversions. More...
|
|
static | getTimeZone () |
| Return the Default Timezone used for date/time conversions. More...
|
|
static | getTimeZoneAdjustment ($timezone, $timestamp) |
| Return the Timezone offset used for date/time conversions to/from UST This requires both the timezone and the calculated date/time to allow for local DST. More...
|
|
Definition at line 37 of file TimeZone.php.
◆ _getTimezoneTransitions()
static PHPExcel_Shared_TimeZone::_getTimezoneTransitions |
( |
|
$objTimezone, |
|
|
|
$timestamp |
|
) |
| |
|
staticprivate |
Return the Timezone transition for the specified timezone and timestamp.
- Parameters
-
DateTimeZone | $objTimezone | The timezone for finding the transitions |
integer | $timestamp | PHP date/time value for finding the current transition |
- Returns
- array The current transition details
Definition at line 92 of file TimeZone.php.
92 {
93 $allTransitions = $objTimezone->getTransitions();
94 $transitions = array();
95 foreach($allTransitions as $key => $transition) {
97 $transitions[] = ($key > 0) ? $allTransitions[$key - 1] : $transition;
98 break;
99 }
100 if (empty($transitions)) {
101 $transitions[] = end($allTransitions);
102 }
103 }
104
105 return $transitions;
106 }
foreach($mandatory_scripts as $file) $timestamp
References $timestamp.
Referenced by getTimeZoneAdjustment().
◆ _validateTimeZone()
static PHPExcel_Shared_TimeZone::_validateTimeZone |
( |
|
$timezone | ) |
|
|
static |
Validate a Timezone name.
- Parameters
-
string | $timezone | Time zone (e.g. 'Europe/London') |
- Returns
- boolean Success or failure
Definition at line 53 of file TimeZone.php.
53 {
54 if (in_array($timezone, DateTimeZone::listIdentifiers())) {
55 return TRUE;
56 }
57 return FALSE;
58 }
◆ getTimeZone()
static PHPExcel_Shared_TimeZone::getTimeZone |
( |
| ) |
|
|
static |
Return the Default Timezone used for date/time conversions.
- Returns
- string Timezone (e.g. 'Europe/London')
Definition at line 80 of file TimeZone.php.
References $_timezone.
◆ getTimeZoneAdjustment()
static PHPExcel_Shared_TimeZone::getTimeZoneAdjustment |
( |
|
$timezone, |
|
|
|
$timestamp |
|
) |
| |
|
static |
Return the Timezone offset used for date/time conversions to/from UST This requires both the timezone and the calculated date/time to allow for local DST.
- Parameters
-
string | $timezone | The timezone for finding the adjustment to UST |
integer | $timestamp | PHP date/time value |
- Returns
- integer Number of seconds for timezone adjustment
- Exceptions
-
Definition at line 117 of file TimeZone.php.
117 {
118 if ($timezone !== NULL) {
119 if (!self::_validateTimezone($timezone)) {
121 }
122 } else {
124 }
125
126 if ($timezone == 'UST') {
127 return 0;
128 }
129
130 $objTimezone = new DateTimeZone($timezone);
131 if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
133 } else {
135 }
136
137 return (count($transitions) > 0) ? $transitions[0]['offset'] : 0;
138 }
static _getTimezoneTransitions($objTimezone, $timestamp)
Return the Timezone transition for the specified timezone and timestamp.
References $_timezone, $timestamp, and _getTimezoneTransitions().
◆ setTimeZone()
static PHPExcel_Shared_TimeZone::setTimeZone |
( |
|
$timezone | ) |
|
|
static |
Set the Default Timezone used for date/time conversions.
- Parameters
-
string | $timezone | Time zone (e.g. 'Europe/London') |
- Returns
- boolean Success or failure
Definition at line 66 of file TimeZone.php.
66 {
67 if (self::_validateTimezone($timezone)) {
68 self::$_timezone = $timezone;
69 return TRUE;
70 }
71 return FALSE;
72 }
◆ $_timezone
PHPExcel_Shared_TimeZone::$_timezone = 'UTC' |
|
staticprotected |
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/TimeZone.php