mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Add example of dates rolling over.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299009 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0e209aff72
commit
87775dd402
1 changed files with 5 additions and 0 deletions
|
@ -139,6 +139,10 @@ echo $date->format('Y-m-d H:i:sP') . "\n";
|
|||
// Using a UNIX timestamp. Notice the result is in the UTC time zone.
|
||||
$date = new DateTime('@946684800');
|
||||
echo $date->format('Y-m-d H:i:sP') . "\n";
|
||||
|
||||
// Non-existant values roll over.
|
||||
$date = new DateTime('2000-02-30');
|
||||
echo $date->format('Y-m-d H:i:sP') . "\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -150,6 +154,7 @@ echo $date->format('Y-m-d H:i:sP') . "\n";
|
|||
2010-04-24 10:24:16-04:00
|
||||
2010-04-25 02:24:16+12:00
|
||||
2000-01-01 00:00:00+00:00
|
||||
2000-03-01 00:00:00-05:00
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue