Bug->Doc #64908 [Asn->Csd]: DateTime's constructor accepts time that not exists because of DST

From: Date: Thu, 23 May 2013 18:39:10 +0000
Subject: Bug->Doc #64908 [Asn->Csd]: DateTime's constructor accepts time that not exists because of DST
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9878@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64908&edit=1 ID: 64908 Updated by: aharvey@php.net Reported by: istvan dot dani at gmail dot com Summary: DateTime's constructor accepts time that not exists because of DST -Status: Assigned +Status: Closed -Type: Bug +Type: Documentation Problem Package: Documentation problem Operating System: OS X 10.8 PHP Version: Irrelevant Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2013-05-23 18:38:50] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=330341 Log: Make DateTime::__construct()'s changelog clearer on the point that exceptions are thrown if the date format is invalid, rather than the date itself. Fixes doc bug #64908 (DateTime's constructor accepts time that not exists because of DST). ------------------------------------------------------------------------ [2013-05-23 18:31:26] aharvey@php.net Reopening. ------------------------------------------------------------------------ [2013-05-23 18:29:41] derick@php.net That's wrong, it should say "invalid date *format*". Marking this as a doc issue. ------------------------------------------------------------------------ [2013-05-23 18:17:46] istvan dot dani at gmail dot com Yep. Manual at http://hu1.php.net/manual/en/datetime.construct.php says: "If an invalid date is specified, then an exception is now thrown. Previously an error was emitted." ------------------------------------------------------------------------ [2013-05-23 17:22:23] derick@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php PHP's date time handling auto-corrects wrong date/time values. This is similar to doing: <?php $n = new DateTime("2013-04-31"); var_dump( $n ); ?> class DateTime#1 (3) { public $date => string(19) "2013-05-01 00:00:00" public $timezone_type => int(3) public $timezone => string(13) "Europe/London" } ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64908 -- Edit this bug report at https://bugs.php.net/bug.php?id=64908&edit=1

« previous php.doc.bugs (#9878) next »