File tree Expand file tree Collapse file tree
reference/datetime/datetimezone Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 <programlisting role =" php" >
4949<![CDATA[
5050<?php
51- $tz = new DateTimeZone("Europe/Prague ");
51+ $tz = new DateTimeZone("Asia/Jakarta ");
5252print_r($tz->getLocation());
5353print_r(timezone_location_get($tz));
5454?>
@@ -59,22 +59,30 @@ print_r(timezone_location_get($tz));
5959<![CDATA[
6060Array
6161(
62- [country_code] => CZ
63- [latitude] => 50.08333
64- [longitude] => 14.43333
65- [comments] =>
62+ [country_code] => ID
63+ [latitude] => -6.16667
64+ [longitude] => 106.8
65+ [comments] => Java, Sumatra
6666)
6767Array
6868(
69- [country_code] => CZ
70- [latitude] => 50.08333
71- [longitude] => 14.43333
72- [comments] =>
69+ [country_code] => ID
70+ [latitude] => -6.16667
71+ [longitude] => 106.8
72+ [comments] => Java, Sumatra
7373)
7474]]>
7575 </screen >
7676 </example >
7777 </para >
78+ <para >
79+ The <literal >country_code</literal > elements contains the ISO 3166-1
80+ alpha-2 country code for each entry. The <literal >latitude</literal > and
81+ <literal >longitude</literal > elements the coordinates of the named city
82+ from the time zone identifier, and <literal >comments</literal > contain
83+ (when not &false; ) a hint of where in the given country this timezone
84+ applies. This information is suitable to present to end-users.
85+ </para >
7886 </refsect1 >
7987
8088 <refsect1 role =" seealso" >
You can’t perform that action at this time.
0 commit comments