Revision 7579,
394 bytes
checked in by acoutinho, 12 years ago
(diff) |
Ticket #3233 - Problemas na configuracao da hora de um evento.
|
Rev | Line | |
---|
[7036] | 1 | <?php |
---|
| 2 | |
---|
| 3 | $zones = timezone_identifiers_list(); |
---|
| 4 | $Time = new DateTime('now', new DateTimeZone('UTC')); |
---|
| 5 | $timezone = array(); |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | foreach ($zones as $zone) |
---|
[5341] | 9 | { |
---|
[7036] | 10 | $timezone['timezones'][$zone] = $Time->setTimezone(new DateTimeZone($zone))->format('O'); |
---|
| 11 | } |
---|
| 12 | |
---|
| 13 | $localtime = localtime(time(), true); |
---|
[7579] | 14 | $timezone['isDaylightSaving'] = !!$localtime['tm_isdst'] ? 1 : 0; |
---|
[7036] | 15 | |
---|
| 16 | echo json_encode($timezone); |
---|
| 17 | |
---|
| 18 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.