source: branches/2.4/prototype/timezones.php @ 7228

Revision 7228, 386 bytes checked in by douglas, 12 years ago (diff)

Ticket #0000 - Copiadas as alterações do Trunk. Versão final da 2.4.2.

Line 
1<?php
2
3$zones = timezone_identifiers_list();
4$Time = new DateTime('now', new DateTimeZone('UTC'));
5$timezone = array();
6
7       
8foreach ($zones as $zone)
9{
10    $timezone['timezones'][$zone] = $Time->setTimezone(new DateTimeZone($zone))->format('O');
11}
12
13$localtime = localtime(time(), true);
14$timezone['isDaylightSaving'] =  !!$localtime['tm_isdst'];
15
16echo json_encode($timezone);
17
18?>
Note: See TracBrowser for help on using the repository browser.