mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Use different time zone in example to clarify how function really works.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@298444 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3a1bd92037
commit
7e03c6b67f
1 changed files with 4 additions and 4 deletions
|
@ -40,11 +40,11 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$winter = new DateTime('2008-12-25', new DateTimeZone('Europe/London'));
|
||||
$summer = new DateTime('2008-07-14', new DateTimeZone('Europe/London'));
|
||||
$winter = new DateTime('2010-12-21', new DateTimeZone('America/New_York'));
|
||||
$summer = new DateTime('2008-06-21', new DateTimeZone('America/New_York'));
|
||||
|
||||
echo $winter->getOffset() . "\n"; // "0"
|
||||
echo $summer->getOffset() . "\n"; // "3600" (= 1 hour)
|
||||
echo $winter->getOffset() . "\n"; // "-18000" (-5 hours)
|
||||
echo $summer->getOffset() . "\n"; // "-14400" (-4 hours)
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue