Skip to content

Commit c904155

Browse files
committed
Document what the fields in the output of DateTimeZone::getLocation() mean
1 parent 3a5f432 commit c904155

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

reference/datetime/datetimezone/getlocation.xml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<programlisting role="php">
4949
<![CDATA[
5050
<?php
51-
$tz = new DateTimeZone("Europe/Prague");
51+
$tz = new DateTimeZone("Asia/Jakarta");
5252
print_r($tz->getLocation());
5353
print_r(timezone_location_get($tz));
5454
?>
@@ -59,22 +59,30 @@ print_r(timezone_location_get($tz));
5959
<![CDATA[
6060
Array
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
)
6767
Array
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">

0 commit comments

Comments
 (0)