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

Bug #15478 BC break - new Date(time()) doesn't work
Submitted: 2009-01-01 03:37 UTC Modified: 2009-01-01 03:49 UTC
From: doconnor Assigned:
Status: Duplicate Package: Date (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2009-01-01 03:37 UTC] doconnor (Daniel O'Connor)
Description: ------------ Its no longer possible to create a new Date() and pass in a timestamp. Instead, setFromTime() must be used. This is a BC break from 1.4.X

Comments

 [2009-01-01 03:42 UTC] doconnor (Daniel O'Connor)
Test: <?php require_once 'Date.php'; $d = new Date(strtotime("2009-01-01 0:00:00")); print date("Y-m-d H:i:s", $d->getTime()); Expected: 2009-01-01 0:00:00 Actual: 1999-11-30 01:00:00
 [2009-01-01 03:45 UTC] gauthierm (Michael Gauthier)
This is a dupe of Bug #14413.
 [2009-01-01 03:49 UTC] doconnor (Daniel O'Connor)