54 if (in_array($timezone, DateTimeZone::listIdentifiers())) {
67 if (self::_validateTimezone($timezone)) {
68 self::$_timezone = $timezone;
81 return self::$_timezone;
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);
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;
static getTimeZone()
Return the Default Timezone used for date/time conversions.
Create styles array
The data for the language used.
foreach($mandatory_scripts as $file) $timestamp
static _validateTimeZone($timezone)
Validate a Timezone name.
static getTimeZoneAdjustment($timezone, $timestamp)
Return the Timezone offset used for date/time conversions to/from UST This requires both the timezone...
static setTimeZone($timezone)
Set the Default Timezone used for date/time conversions.
static _getTimezoneTransitions($objTimezone, $timestamp)
Return the Timezone transition for the specified timezone and timestamp.