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

Bug #14434 Multiple calls to toUTC() weirdness
Submitted: 2008-08-01 11:00 UTC
From: sporkstorms Assigned:
Status: Open Package: Date (version 1.4.7)
PHP Version: 5.2.6 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2008-08-01 11:00 UTC] sporkstorms (Mark Stratman)
Description: ------------ When calling toUTC() multiple times on separate date objects it has inconsistent results. See the example script and output that follows. Test script: --------------- $time = new Date(); $time->toUTC(); echo $time->getDate() . "\n"; $time2 = new Date(); $time2->toUTC(); echo $time2->getDate() . "\n"; Expected result: ---------------- I'm not sure which is truly UTC.. so either: 2008-08-01 10:57:55 2008-08-01 10:57:55 OR 2008-08-01 03:57:55 2008-08-01 03:57:55 Actual result: -------------- 2008-08-01 03:57:55 2008-08-01 10:57:55

Comments

 [2010-07-09 13:21 UTC] jespino (Jesús Espino)
The test script give me the "Expected result" with the 1.4.7 version of the package with PHP 5.3.2-1ubuntu4.2.