derick          Fri Apr 13 14:09:20 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/ext/date   php_date.c 
  Log:
  - Fixed bug #39416 (Milliseconds in date()).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.643&r2=1.2027.2.547.2.644&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.643 php-src/NEWS:1.2027.2.547.2.644
--- php-src/NEWS:1.2027.2.547.2.643     Fri Apr 13 08:33:48 2007
+++ php-src/NEWS        Fri Apr 13 14:09:20 2007
@@ -12,6 +12,7 @@
   timezone offset). (Derick)
 - Fixed bug #39965 (Latitude and longitude are backwards in date_sun_info()).
   (Derick)
+- Fixed bug #39416 (Milliseconds in date()). (Derick)
 
 
 10 Apr 2007, PHP 5.2.2RC1
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.44&r2=1.43.2.45.2.45&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.44 
php-src/ext/date/php_date.c:1.43.2.45.2.45
--- php-src/ext/date/php_date.c:1.43.2.45.2.44  Fri Apr 13 08:33:48 2007
+++ php-src/ext/date/php_date.c Fri Apr 13 14:09:20 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.44 2007/04/13 08:33:48 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.45 2007/04/13 14:09:20 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>
@@ -792,6 +793,7 @@
                        case 'H': length = slprintf(buffer, 32, "%02d", (int) 
t->h); break;
                        case 'i': length = slprintf(buffer, 32, "%02d", (int) 
t->i); break;
                        case 's': length = slprintf(buffer, 32, "%02d", (int) 
t->s); break;
+                       case 'u': length = slprintf(buffer, 32, "%06d", (int) 
floor(t->f * 1000000)); break;
 
                        /* timezone */
                        case 'I': length = slprintf(buffer, 32, "%d", localtime 
? offset->is_dst : 0); break;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to