Bug 52342 [Open] DateTime setIsoDate results in wrong timestamp |
|
| BugsAlert Home > Bug 52342 [Open] DateTime setIsoDate results in wrong timestamp | |
|
Date/time related (Bug)
Reported by freund@...
2010-07-15T08:41:58+02:00
PHP: 5.3.2, OS: Debian Lenny, Package Version:
Description:
------------
Try to get Midnight of the first Weekday of a Weeknumber of a specific year:
$from = new DateTime();
$from->setTime(0, 0, 0);
$from->setISODate(2010, 28, 1); //Montag der 28ten Woche 2010
echo $from->format('d.m.Y H:i'); //A
echo $from->getTimestamp(); //B
echo date('Y-m-d H:i', $from->getTimestamp()); //C
The result is as expected, after adding an interval of 0 Days:
$from->add(new DateInterval('P0D'));
Expected result:
----------------
12.07.2010
1278885600
12.07.2010 00:00
Actual result:
--------------
12.07.2010
1291849200
29.05.2011 00:00
Original Source: http://bugs.php.net/52342 Learn more about Bug 52342 [Open] DateTime setIsoDate results in wrong timestamp |
|
|
Tags: bug 52342 open datetime setisodate results wrong timestamp |
|
Related Items |
|
|
PHPhotoalbum Two SQL Injection Vulnerabilities
|
|
|
FastCGI fails with wrong error on HEAD request to non-existant file
|
|
|
VUPEN - Avaya Products Firefox Multiple Remote Code Execution Vulnerabilities
|
|
|
FrSIRT - Ubuntu Security Update Fixes ICU Regular Expressions Vulnerabilities
|
|
|
VUPEN - Debian Security Update Fixes elinks Buffer Overflow Vulnerability
|
|
|
WORM_RANSOM.FD
|
|
|
David Boswell: What I learned from the Firefox Nightly Builds site
|
|