note 107318 added to datetimezone.getlocation

From: Date: Mon, 30 Jan 2012 20:34:13 +0000
Subject: note 107318 added to datetimezone.getlocation
Groups: php.notes 
Request: Send a blank email to php-notes+get-185797@lists.php.net to get a copy of this message
Print comments associated with timezones for a specific country. In this example, print all the comments for Canadian timezones. <? $timeZones = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, 'CA'); foreach ( $timeZones as $key => $zoneName ) { $tz = new DateTimeZone($zoneName); $loc = $tz->getLocation(); print($zoneName . " = " . $loc['comments'] . "<br>"); } ?> Output: America/Atikokan = Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut America/Blanc-Sablon = Atlantic Standard Time - Quebec - Lower North Shore America/Cambridge_Bay = Mountain Time - west Nunavut America/Dawson = Pacific Time - north Yukon America/Dawson_Creek = Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia America/Edmonton = Mountain Time - Alberta, east British Columbia & west Saskatchewan ...(snip)... ---- Server IP: 212.124.37.9 Probable Submitter: 216.16.243.18 ---- Manual Page -- http://www.php.net/manual/en/datetimezone.getlocation.php Edit -- https://master.php.net/note/edit/107318 Del: integrated -- https://master.php.net/note/delete/107318/integrated Del: useless -- https://master.php.net/note/delete/107318/useless Del: bad code -- https://master.php.net/note/delete/107318/bad+code Del: spam -- https://master.php.net/note/delete/107318/spam Del: non-english -- https://master.php.net/note/delete/107318/non-english Del: in docs -- https://master.php.net/note/delete/107318/in+docs Del: other reasons-- https://master.php.net/note/delete/107318 Reject -- https://master.php.net/note/reject/107318 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185797) next »