Bug #55743 [NEW]: date u - Microseconds (added in PHP 5.2.2)

From: Date: Tue, 20 Sep 2011 18:42:46 +0000
Subject: Bug #55743 [NEW]: date u - Microseconds (added in PHP 5.2.2)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-163726@lists.php.net to get a copy of this message
From:             
Operating system: All
PHP version:      5.4.0beta1
Package:          Date/time related
Bug Type:         Bug
Bug description:date u - Microseconds (added in PHP 5.2.2)

Description:
------------
http://pl.php.net/manual/en/function.date.php
http://pl.php.net/manual/en/function.gmdate.php

Specification:

u - Microseconds (added in PHP 5.2.2) - Example: 654321


u formater do not works because second parameter (called timestamp) is int
type
u formater will works if second parameter (called timestamp) is double
(compatible with current int)

Please remove u formater useless or fix specyfication
or a better fix it int -> double (second parameter)

Test script:
---------------
<?=gmdate('u',12.13)?>
<?=date('u',12.13)?>

Expected result:
----------------
130000
130000

Actual result:
--------------
000000
000000

-- 
Edit bug report at https://bugs.php.net/bug.php?id=55743&edit=1
-- 
Try a snapshot (PHP 5.4):            https://bugs.php.net/fix.php?id=55743&r=trysnapshot54
Try a snapshot (PHP 5.3):            https://bugs.php.net/fix.php?id=55743&r=trysnapshot53
Try a snapshot (trunk):              https://bugs.php.net/fix.php?id=55743&r=trysnapshottrunk
Fixed in SVN:                        https://bugs.php.net/fix.php?id=55743&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55743&r=needdocs
Fixed in release:                    https://bugs.php.net/fix.php?id=55743&r=alreadyfixed
Need backtrace:                      https://bugs.php.net/fix.php?id=55743&r=needtrace
Need Reproduce Script:               https://bugs.php.net/fix.php?id=55743&r=needscript
Try newer version:                   https://bugs.php.net/fix.php?id=55743&r=oldversion
Not developer issue:                 https://bugs.php.net/fix.php?id=55743&r=support
Expected behavior:                   https://bugs.php.net/fix.php?id=55743&r=notwrong
Not enough info:                     https://bugs.php.net/fix.php?id=55743&r=notenoughinfo
Submitted twice:                     https://bugs.php.net/fix.php?id=55743&r=submittedtwice
register_globals:                    https://bugs.php.net/fix.php?id=55743&r=globals
PHP 4 support discontinued:          https://bugs.php.net/fix.php?id=55743&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55743&r=dst
IIS Stability:                       https://bugs.php.net/fix.php?id=55743&r=isapi
Install GNU Sed:                     https://bugs.php.net/fix.php?id=55743&r=gnused
Floating point limitations:          https://bugs.php.net/fix.php?id=55743&r=float
No Zend Extensions:                  https://bugs.php.net/fix.php?id=55743&r=nozend
MySQL Configuration Error:           https://bugs.php.net/fix.php?id=55743&r=mysqlcfg



Thread (5 messages)

« previous php.bugs (#163726) next »