Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a4

Request #9700 Incorrect timestamps allowd
Submitted: 2006-12-26 21:30 UTC
From: seb dot anselment at gmx dot de Assigned: c01234
Status: Closed Package: Date (version 1.4.7)
PHP Version: 4.3.10 OS: Debian
Roadmaps: (Not assigned)    
Subscription  


 [2006-12-26 21:30 UTC] seb dot anselment at gmx dot de (Sébastien Anselment)
Description: ------------ Hi, I really love this package but I found a very strange behavior when passing a not existing timestamp like f.ex. 20060132T163315 (month is 32) to the Date constructor. Surely this makes no sense but it's so easy to set a correct date (like mktime does). You can see the test script beyond these lines. I found nothing in one of the 88 reports matching this topic. Now decide yourselves if this is a bug report or feature request ;) I wish you all a merry Christmas and a happy new year! Continue your great work. Yours, Seb Test script: --------------- $timestamp = "20060132T163315"; $d = new Date($timestamp); echo $d->getDate(DATE_FORMAT_ISO_BASIC); //I solved this by using: $timestamp = "20060132T163315"; $d = new Date($timestamp); $d->addSpan(new Date_Span("0,0,0,0")); echo $d->getDate(DATE_FORMAT_ISO_BASIC); Expected result: ---------------- 2006-02-01 16:33:15 Actual result: -------------- 2006-01-32 16:33:15

Comments

 [2006-12-27 01:31 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-11-06 01:09 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2008-03-23 23:05 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!