diff options
| author | Derick Rethans <derick@php.net> | 2007-04-13 14:09:20 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2007-04-13 14:09:20 +0000 |
| commit | 35d5a196bd2f2ae936ab9c1bcecda2284c9cb47d (patch) | |
| tree | 0bbae4a37ab41d5e66699927033350fa38bd0c7d /ext | |
| parent | d3df2eb468cff5e1a5ddbdb44c2e1d299be7a43d (diff) | |
| download | php-git-35d5a196bd2f2ae936ab9c1bcecda2284c9cb47d.tar.gz | |
- Fixed bug #39416 (Milliseconds in date()).
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/date/php_date.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ea896b6f87..5e0ec7c1a5 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -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 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca 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; |
