Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromphp/php-src

Commit5562654

Browse files
committed
Improve support for microseconds with Date/Time
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, whichcauses changes to the volatile abbreviations tests.
1 parentd5b77d6 commit5562654

File tree

40 files changed

+1237
-933
lines changed

40 files changed

+1237
-933
lines changed

‎NEWS‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ PHP NEWS
1414
. Fixed bug #73126 (Cannot pass parameter 1 by reference). (Anatol)
1515
. Fixed bug #69579 (Invalid free in extension trait). (John Boehr)
1616

17+
- Date:
18+
. Fixed bug #45554 (Inconsistent behavior of the u format char). (Derick)
19+
. Fixed bug #48225 (DateTime parser doesn't set microseconds for "now").
20+
(Derick)
21+
. Fixed bug #52514 (microseconds are missing in DateTime class). (Derick)
22+
. Fixed bug #52519 (microseconds in DateInterval are missing). (Derick)
23+
. Fixed bug #60089 (DateTime::createFromFormat() U after u nukes microtime).
24+
(Derick)
25+
. Fixed bug #68506 (General DateTime improvments needed for microseconds to
26+
become useful). (Derick)
27+
. Fixed bug #73109 (timelib_meridian doesn't parse dots correctly). (Derick)
28+
. Fixed bug #73247 (DateTime constructor does not initialise microseconds
29+
property). (Derick)
30+
31+
1732
- GD:
1833
. Fixed bug #50194 (imagettftext broken on transparent background w/o
1934
alphablending). (cmb)

‎ext/date/config.w32‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true);
1111
tl_config.WriteLine("#include \"config.w32.h\"");
1212
tl_config.WriteLine("#include <php_stdint.h>");
1313
tl_config.WriteLine("#define TIMELIB_OMIT_STDINT 1");
14+
tl_config.WriteLine("#define HAVE_GETTIMEOFDAY 1");
1415
tl_config.WriteLine("#include \"zend.h\"");
1516
tl_config.WriteLine("#define timelib_malloc emalloc");
1617
tl_config.WriteLine("#define timelib_realloc erealloc");

‎ext/date/lib/interval.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
6565
rt->h=two->h-one->h;
6666
rt->i=two->i-one->i;
6767
rt->s=two->s-one->s;
68+
rt->f=two->f-one->f;
6869
if (one_backup.dst==0&&two_backup.dst==1&&two->sse >=one->sse+86400-dst_corr) {
6970
rt->h+=dst_h_corr;
7071
rt->i+=dst_m_corr;
@@ -110,6 +111,7 @@ timelib_time *timelib_add(timelib_time *old_time, timelib_rel_time *interval)
110111
t->relative.h=interval->h*bias;
111112
t->relative.i=interval->i*bias;
112113
t->relative.s=interval->s*bias;
114+
t->relative.f=interval->f*bias;
113115
}
114116
t->have_relative=1;
115117
t->sse_uptodate=0;
@@ -145,6 +147,7 @@ timelib_time *timelib_sub(timelib_time *old_time, timelib_rel_time *interval)
145147
t->relative.h=0- (interval->h*bias);
146148
t->relative.i=0- (interval->i*bias);
147149
t->relative.s=0- (interval->s*bias);
150+
t->relative.f=0- (interval->f*bias);
148151
t->have_relative=1;
149152
t->sse_uptodate=0;
150153

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp