note 114334 added to function.date-create
| From: | tienhm at email dot thinknet dot vn | Date: | Mon, 10 Feb 2014 04:43:05 +0000 |
| Subject: | note 114334 added to function.date-create | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198442@lists.php.net to get a copy of this message | ||
The construct have some problem with date validate.
When you set
$datetime = DateTime::createFromFormat('Y-m-d H:i:s','2009-02-30 00:00:00');
it will be accepted but convert to 2009-03-02 00:00:00, it means the date was count on and plus 2
days
----
Server IP: 72.52.91.14
Probable Submitter: 72.52.91.14
----
Manual Page -- http://php.net/manual/en/function.date-create.php
Edit -- https://master.php.net/note/edit/114334
Del: integrated -- https://master.php.net/note/delete/114334/integrated
Del: useless -- https://master.php.net/note/delete/114334/useless
Del: bad code -- https://master.php.net/note/delete/114334/bad+code
Del: spam -- https://master.php.net/note/delete/114334/spam
Del: non-english -- https://master.php.net/note/delete/114334/non-english
Del: in docs -- https://master.php.net/note/delete/114334/in+docs
Del: other reasons-- https://master.php.net/note/delete/114334
Reject -- https://master.php.net/note/reject/114334
Search -- https://master.php.net/manage/user-notes.php