diff options
author | Derick Rethans <github@derickrethans.nl> | 2016-10-05 11:24:15 -0400 |
---|---|---|
committer | Derick Rethans <github@derickrethans.nl> | 2016-10-05 15:03:06 -0400 |
commit | 55626549d81d0feadb1d160be78fcf2b898a48cc (patch) | |
tree | a00c6239804f2ad68ccc3470e63e83eb18f7897f /ext/date/lib/timelib.c | |
parent | d5b77d66626b138a83b6c0d16f746893fefa29ee (diff) | |
download | php-git-microseconds.tar.gz |
Improve support for microseconds with Date/Timemicroseconds
It fixes several bugs:
- Fixed bug #45554 (Inconsistent behavior of the u format char).
- Fixed bug #48225 (DateTime parser doesn't set microseconds for "now").
- Fixed bug #52514 (microseconds are missing in DateTime class).
- Fixed bug #52519 (microseconds in DateInterval are missing).
- Fixed bug #68506 (General DateTime improvments needed for microseconds to become useful).
- Fixed bug #73109 (timelib_meridian doesn't parse dots correctly).
- Fixed bug #73247 (DateTime constructor does not initialise microseconds property).
It also updates timelib to 2016.04, and updates a data mapping file, which
causes changes to the volatile abbreviations tests.
Diffstat (limited to 'ext/date/lib/timelib.c')
-rw-r--r-- | ext/date/lib/timelib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/date/lib/timelib.c b/ext/date/lib/timelib.c index b9fb66f00f..84dba3d969 100644 --- a/ext/date/lib/timelib.c +++ b/ext/date/lib/timelib.c @@ -231,7 +231,7 @@ void timelib_dump_date(timelib_time *d, int options) printf("TS: %lld | %s%04lld-%02lld-%02lld %02lld:%02lld:%02lld", d->sse, d->y < 0 ? "-" : "", TIMELIB_LLABS(d->y), d->m, d->d, d->h, d->i, d->s); if (d->f > +0.0) { - printf(" %.5f", d->f); + printf(" %.6f", d->f); } if (d->is_localtime) { @@ -260,6 +260,9 @@ void timelib_dump_date(timelib_time *d, int options) if (d->have_relative) { printf("%3lldY %3lldM %3lldD / %3lldH %3lldM %3lldS", d->relative.y, d->relative.m, d->relative.d, d->relative.h, d->relative.i, d->relative.s); + if (d->relative.f) { + printf(" %6f", d->relative.f); + } if (d->relative.first_last_day_of != 0) { switch (d->relative.first_last_day_of) { case 1: |