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.
References $key, $timestamp, and array.
93 $allTransitions = $objTimezone->getTransitions();
94 $transitions =
array();
95 foreach($allTransitions as
$key => $transition) {
97 $transitions[] = (
$key > 0) ? $allTransitions[
$key - 1] : $transition;
100 if (empty($transitions)) {
101 $transitions[] = end($allTransitions);
Create styles array
The data for the language used.
foreach($mandatory_scripts as $file) $timestamp
◆ _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.
54 if (in_array($timezone, DateTimeZone::listIdentifiers())) {
◆ 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.
81 return self::$_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.
References $timestamp.
118 if ($timezone !== NULL) {
119 if (!self::_validateTimezone($timezone)) {
123 $timezone = self::$_timezone;
126 if ($timezone ==
'UST') {
130 $objTimezone =
new DateTimeZone($timezone);
131 if (version_compare(PHP_VERSION,
'5.3.0') >= 0) {
134 $transitions = self::_getTimezoneTransitions($objTimezone,
$timestamp);
137 return (count($transitions) > 0) ? $transitions[0][
'offset'] : 0;
foreach($mandatory_scripts as $file) $timestamp
◆ 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.
67 if (self::_validateTimezone($timezone)) {
68 self::$_timezone = $timezone;
◆ $_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