Bug #54909 [NEW]: Relative weekday modifications reset time values.
| From: | salathe@php.net | Date: | Mon, 23 May 2011 13:55:55 +0000 |
| Subject: | Bug #54909 [NEW]: Relative weekday modifications reset time values. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-160914@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: 5.3.6
Package: Date/time related
Bug Type: Bug
Bug description:Relative weekday modifications reset time values.
Description:
------------
Date modifications utilizing the "weekdays" keyword change the resulting
date to
have zero values for hour/minute/second units. Prior to PHP 5.3.6, the
time
values were unaffected.
Test script:
---------------
<?php
$dt = new DateTime('2011-05-10 12:34:56', new DateTimeZone('UTC'));
$dt->modify('10 weekdays');
echo $dt->format('r');
?>
Expected result:
----------------
Tue, 24 May 2011 12:34:56 +0000
Actual result:
--------------
Tue, 24 May 2011 00:00:00 +0000
--
Edit bug report at http://bugs.php.net/bug.php?id=54909&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54909&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54909&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54909&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54909&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54909&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54909&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54909&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54909&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54909&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54909&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54909&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54909&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54909&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54909&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54909&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54909&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54909&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54909&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54909&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54909&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54909&r=mysqlcfg