ID: 46788 Updated by: [EMAIL PROTECTED] Reported By: neo_in_matrix at msn dot com Status: Bogus Bug Type: Date/time related Operating System: all PHP Version: 5.2.7 New Comment:
Please read the docs: http://php.net/date "Note: Since this function only accepts integer timestamps the u format character is only useful when using the date_format() function with user based timestamps created with date_create(). " Previous Comments: ------------------------------------------------------------------------ [2008-12-09 13:58:26] [EMAIL PROTECTED] Like this: $d = new DateTime("2008-12-09 14:57:55.25871"); echo $d->format( "u" ); echos: 258710 ------------------------------------------------------------------------ [2008-12-09 13:54:16] neo_in_matrix at msn dot com Sorry... But I am quite curious about this 'problem'. Since date does not return useful value for 'u', what else functions use this format? ------------------------------------------------------------------------ [2008-12-07 14:18:34] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This is correct. Date internally only uses timestamps, which are signed *integers* and thus don't know anything about fractions. ------------------------------------------------------------------------ [2008-12-06 19:56:42] [EMAIL PROTECTED] engine > date/time ------------------------------------------------------------------------ [2008-12-06 19:42:30] neo_in_matrix at msn dot com Description: ------------ date('u') always returns 0's, on Windows and Linux. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46788&edit=1