Doc #63360 [NEW]: Changelog may be incorrect
| From: | wachsmuth at cominto dot de | Date: | Thu, 25 Oct 2012 11:20:48 +0000 |
| Subject: | Doc #63360 [NEW]: Changelog may be incorrect | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-9007@lists.php.net to get a copy of this message | ||
From: wachsmuth at cominto dot de
Operating system: windows
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Changelog may be incorrect
Description:
------------
---
From manual page: http://www.php.net/datetime.modify
---
Hello,
the Changelog says with PHP 5.3.6 "Absolute date/time statements now take
effect"
I run following script with PHP 5.3.8. The first two times and the last
time it is correct. But modify('now') does not set the date to "now" like
setTimeStamp(time()). The documentation here is misleading
Test script:
---------------
$d = new DateTime();
$d->setTimeStamp(strtotime('2012-10-25'));
assertThis(25, $d);
$d->modify('-1 day');
assertThis(24, $d);
$d->modify('now');
assertThis(25, $d);
$d->setTimeStamp(time());
assertThis(25, $d);
function assertThis($expected, $actual) {
print 'expected ' . $expected . ' - ' . $actual->format('d') .
"
actual\n";
}
Expected result:
----------------
expected 25 - 25 actual
expected 24 - 24 actual
expected 25 - 25 actual
expected 25 - 25 actual
Actual result:
--------------
expected 25 - 25 actual
expected 24 - 24 actual
expected 25 - 24 actual
expected 25 - 25 actual
--
Edit bug report at https://bugs.php.net/bug.php?id=63360&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63360&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63360&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63360&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63360&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63360&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63360&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63360&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63360&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63360&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63360&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=63360&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=63360&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63360&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63360&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63360&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63360&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63360&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63360&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63360&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63360&r=mysqlcfg