Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

timezone_transitions_get

(no version information, might be only in CVS)

timezone_transitions_get -- Returns all transitions for the timezone

Описание

array timezone_transitions_get ( DateTimeZone object )

array DateTimeZone::getTransitions ( void )

Список параметров

object

DateTimeZone object.

Возвращаемые значения

Returns numerically indexed array containing associative array with all transitions on success or FALSE on failure.

Примеры

Пример 1. A timezone_transitions_get() example

<?php
$timezone
= new DateTimeZone("CET");
print_r(reset($timezone->getTransitions()));
?>

Результатом выполнения данного примера будет что-то подобное:

Array
(
    [ts] => -1693706400
    [time] => 1916-04-30T22:00:00+0000
    [offset] => 7200
    [isdst] => 1
    [abbr] => CEST
)



add a note add a note User Contributed Notes
timezone_transitions_get
gopalv at php dot net
19-Jun-2007 01:10
From Derick's talk (http://talks.php.net/show/time-ffm2006/28)

<?php
$tz
= new DateTimeZone("PST");

foreach (
timezone_transitions_get($tz) as $tr)
    if (
$tr['ts'] > time())
        break;

$d = new DateTime( "@{$tr['ts']}" );
printf("The timezone %s switches to %s on %s.<br/>The new GMT offset will be: %d (%s)\n",
   
$tz->getName(), $tr['isdst'] ? "DST" : "standard time",
   
$d->format('d M Y @ H:i'), $tr['offset'], $tr['abbr']
);
?>

DB++> <timezone_open
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571