derick Fri Apr 13 14:10:38 2007 UTC
Modified files:
/php-src/ext/date php_date.c
Log:
- MFB: Fixed bug #39416 (Milliseconds in date()).
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.134&r2=1.135&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.134 php-src/ext/date/php_date.c:1.135
--- php-src/ext/date/php_date.c:1.134 Fri Apr 13 08:34:11 2007
+++ php-src/ext/date/php_date.c Fri Apr 13 14:10:38 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.c,v 1.134 2007/04/13 08:34:11 derick Exp $ */
+/* $Id: php_date.c,v 1.135 2007/04/13 14:10:38 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -25,6 +25,7 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/standard/php_versioning.h"
+#include "ext/standard/php_math.h"
#include "php_date.h"
#include "lib/timelib.h"
#include <time.h>
@@ -900,6 +901,7 @@
case 'H': length = date_spprintf(&buffer, 32 TSRMLS_CC,
"%02d", (int) t->h); break;
case 'i': length = date_spprintf(&buffer, 32 TSRMLS_CC,
"%02d", (int) t->i); break;
case 's': length = date_spprintf(&buffer, 32 TSRMLS_CC,
"%02d", (int) t->s); break;
+ case 'u': length = date_spprintf(&buffer, 32 TSRMLS_CC,
"%06d", (int) floor(t->f * 1000000)); break;
/* timezone */
case 'I': length = date_spprintf(&buffer, 32 TSRMLS_CC,
"%d", localtime ? offset->is_dst : 0); break;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php