note 83080 added to function.strtotime
| From: | php dot net at dubaifaqs dot com | Date: | Fri, 09 May 2008 07:08:12 +0000 |
| Subject: | note 83080 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139206@lists.php.net to get a copy of this message | ||
Booyah! $time containing only numeric and space characters results in unexpected output (at least on
Win2K server, not checked with linux).
<?php
echo date('d F Y', strtotime('2007')); // today's date (09 May 2008)
displayed
echo date('d F Y', strtotime('01 2007')); // Warning: date(): Windows does not
support dates prior to midnight (00:00:00), January 1, 1970
echo date('d F Y', strtotime('01 01 2007')); // same warning
echo date('d F Y', strtotime('01 Jan 2007')); // 01 January 2007
?>
No bug report submitted, I don't know enough about php and servers to know if this is expected
behaviour or not.
----
Server IP: 69.147.83.197
Probable Submitter: 213.42.21.156 (proxied: 92.97.117.248)
----
Manual Page -- http://www.php.net/manual/en/function.strtotime.php
Edit -- https://master.php.net/note/edit/83080
Del: integrated -- https://master.php.net/note/delete/83080/integrated
Del: useless -- https://master.php.net/note/delete/83080/useless
Del: bad code -- https://master.php.net/note/delete/83080/bad+code
Del: spam -- https://master.php.net/note/delete/83080/spam
Del: non-english -- https://master.php.net/note/delete/83080/non-english
Del: in docs -- https://master.php.net/note/delete/83080/in+docs
Del: other reasons-- https://master.php.net/note/delete/83080
Reject -- https://master.php.net/note/reject/83080
Search -- https://master.php.net/manage/user-notes.php