From: glass at glasshalfawesome dot com Operating system: Win7 PHP version: Irrelevant Package: Date/time related Bug Type: Feature/Change Request Bug description:Add microseconds to DateTime::format
Description: ------------ >From what I can find it's currently not possible to add or subtract microseconds using DateTime::format. Every other unit of time can be added or subtracted. Please consider adding: decisecond centisecond millisecond microsecond Test script: --------------- $time = new DateTime('01:01:01.000001'); $timeH = $time->modify('+1 hour'); echo $timeH->format('H:i:s.u') . '<br>'; // prints 02:01:01.000001 $timeM = $time->modify('+1 minute'); echo $timeM->format('H:i:s.u') . '<br>'; // prints 02:02:01.000001 $timeS = $time->modify('+1 second'); echo $timeS->format('H:i:s.u') . '<br>'; // prints 02:02:02.000001 $timeMS = $time->modify('+1 microsecond'); echo $timeMS->format('H:i:S:u') . '<br>'; // error -- Edit bug report at https://bugs.php.net/bug.php?id=64887&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64887&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64887&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64887&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64887&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64887&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64887&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64887&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64887&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64887&r=support Expected behavior: https://bugs.php.net/fix.php?id=64887&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64887&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64887&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64887&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64887&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64887&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64887&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64887&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64887&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64887&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64887&r=mysqlcfg