1
0
mirror of https://github.com/php/php-src.git synced 2026-04-11 01:53:36 +02:00
Commit Graph

1131 Commits

Author SHA1 Message Date
Derick Rethans
e5b4624b8b Fixed #9165: strtotime translates a date-time with DST/non-DST hour differently based on default timezone 2022-09-14 10:42:42 +01:00
Derick Rethans
3509ca3d65 Merge branch 'PHP-8.0' into PHP-8.1 2022-08-11 16:26:40 +01:00
Derick Rethans
962d8bd0b6 The data for Tehran has changed, update test 2022-08-11 16:26:33 +01:00
Derick Rethans
a0c01f385c Add test case for GH-9601: DateInterval 1.5s added to DateTimeInterface is rounded down since PHP 8.1.0 2022-07-28 11:55:35 +01:00
Derick Rethans
b0d67aa605 Merge remote-tracking branch 'derickr/bug80047-take2' into PHP-8.1 2022-07-28 11:48:30 +01:00
Derick Rethans
001e7dbb04 Fixed bug #80047 (DatePeriod doesn't warn with custom DateTimeImmutable) 2022-07-28 10:28:10 +01:00
Derick Rethans
85f3a969dc Revert "Fixed #80047: DatePeriod doesn't warn with custom DateTimeImmutable"
This reverts commit 973c3f6e24.
2022-07-28 10:13:54 +01:00
Derick Rethans
7831a1cae6 Add test case for GH-8964 2022-07-22 13:06:32 +01:00
Derick Rethans
355995735b Fixed diff, again 2022-07-21 12:11:42 +01:00
Derick Rethans
37d460b64a Fixed #81263: Wrong result from DateTimeImmutable::diff 2022-07-21 12:11:42 +01:00
Derick Rethans
cc9c57722a Fixed GH-8730: DateTime::diff miscalculation is same time zone of different type 2022-07-21 12:11:42 +01:00
Derick Rethans
49a3cc63dd Merge branch 'PHP-8.0' into PHP-8.1 2022-06-25 17:53:26 +01:00
Derick Rethans
973c3f6e24 Fixed #80047: DatePeriod doesn't warn with custom DateTimeImmutable 2022-06-25 17:52:14 +01:00
Derick Rethans
3fed226e62 Merge branch 'PHP-8.0' into PHP-8.1 2022-06-17 09:36:45 +01:00
Derick Rethans
b23dfe4986 Skip tests on 32-bit 2022-06-17 09:34:27 +01:00
Derick Rethans
36990aab8e Fixed bug #77243 (Weekdays are calculated incorrectly for negative years) 2022-06-17 09:34:27 +01:00
Derick Rethans
f3d23d45c0 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-27 14:44:06 +01:00
Derick Rethans
d5e57268a9 Fixed bug #78139 (timezone_open accepts invalid timezone string argument). 2022-05-27 14:43:04 +01:00
Derick Rethans
4f32983fbe Merge branch 'PHP-8.0' into PHP-8.1 2022-05-27 14:27:29 +01:00
Derick Rethans
6418eba1cd Fixed bug #74671 (DST timezone abbreviation has incorrect offset) 2022-05-27 09:33:20 +01:00
Matteo Beccati
6d4ebe7e0f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed test
2022-05-27 08:37:21 +02:00
Matteo Beccati
b90201745f Fixed test 2022-05-27 08:36:56 +02:00
Derick Rethans
a04eccb294 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-26 15:19:27 +01:00
Derick Rethans
209ea3ffc7 Fixed tests 2022-05-26 14:30:22 +01:00
Derick Rethans
2dcd82162e Fixed bug #72963 (Null-byte injection in CreateFromFormat and related functions) 2022-05-26 13:49:51 +01:00
Derick Rethans
dfd1d7a531 Fixed bug #76963 (Null-byte injection in createFromFormat) 2022-05-26 13:49:51 +01:00
Derick Rethans
008016b536 Fixed bug #81565 (date parsing fails when provided with timezones including seconds) 2022-05-20 13:18:43 +01:00
Derick Rethans
78d5076b25 Fixed bug #51987 (Datetime fails to parse an ISO 8601 ordinal date (extended format)) 2022-05-20 13:18:43 +01:00
Derick Rethans
23dbefdb7b Fixed bug #51934 (strtotime plurals / incorrect time) 2022-05-20 13:18:43 +01:00
Derick Rethans
20d8c1bea5 Fixed bug #68549 (Timezones and offsets are not properly used when working with dates) 2022-05-20 13:18:43 +01:00
Derick Rethans
ee2776210b Fixed bug #66019 (DateTime object does not support short ISO 8601 time format - YYYY-MM-DDTHH) 2022-05-20 13:18:43 +01:00
Derick Rethans
ef55bf7149 Fixed bug GH-7758 (Problems with negative timestamps and fractions) 2022-05-20 13:18:42 +01:00
Derick Rethans
b510868bb8 Adjust existing tests for fixed bugs 2022-05-20 13:18:26 +01:00
Derick Rethans
7670ee4342 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-05 15:24:10 +01:00
Derick Rethans
92f8f19d50 Fixed GH-8471: Segmentation fault when converting immutable and mutable DateTime instances created using reflection 2022-05-05 12:10:50 +01:00
Derick Rethans
15ee285f83 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-22 10:31:14 +01:00
Derick Rethans
c854bb2472 Fixed GH-8400: bug73837.phpt makes no sense
Replaces the indeed silly test with something that actually does the job,
albeit much slower.
2022-04-22 10:29:37 +01:00
Derick Rethans
ec0771c03f Merge branch 'PHP-8.0' into PHP-8.1 2022-04-14 10:32:21 +01:00
Derick Rethans
e38d300a70 Refactor code to avoid duplication 2022-04-14 10:32:10 +01:00
Cody Mann
287c8a86b4 GH-7979: iterator advances when checking if valid 2022-04-14 10:22:00 +01:00
Derick Rethans
e6c4988187 Fixed #7752, #8101, #81660: DateTimeZone::getTransitions() returns insufficient data 2022-04-01 13:28:05 +01:00
Derick Rethans
e4679ef0c2 Fixed date/diff where the difference in hour is less than 1 2021-11-18 13:55:51 +00:00
Derick Rethans
904933e918 Fixed bug #81458: Regression: Incorrect difference after timezone change 2021-11-08 09:40:27 +00:00
Christoph M. Becker
2e65c8e581 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81500: Interval serialization regression since 7.3.14 / 7.4.2
2021-10-15 19:13:38 +02:00
Christoph M. Becker
fc886694d3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81500: Interval serialization regression since 7.3.14 / 7.4.2
2021-10-15 19:11:26 +02:00
Christoph M. Becker
866adb122a Fix #81500: Interval serialization regression since 7.3.14 / 7.4.2
While it may not be desired, `DateInterval::$f` supports negative
values, at least with regard to calculations.  We still need to guard
from assigning double values which are out of range for signed 64bit
integers (which would be undefined behavior).  zend_dval_to_lval() does
this by returning `0` instead of triggering UB.  This way we can avoid
setting the invalid marker, which doesn't work as expected anyway.

We must not do that only for unserialization, but also when the property
is set in the first place.

We need to adapt some of the existing tests wrt. this behavior.  In
particular, we check for an arbitrary value in bug79015.phpt, to cater
to differences between 32bit and 64bit architectures.

Closes GH-7575.
2021-10-15 19:08:07 +02:00
Hao Sun
582e21fbda Reduce threshold further in ext/date/tests/bug73837.phpt
The threshold in test case ext/date/tests/bug73837.phpt has been reduced
several times, from the original 990 to current 400. However, this case
still failed on my local test with Mac Mini machine(macOS on Apple
silicon). Here is the diff result:

```
  $ cat ext/date/tests/bug73837.diff
     int(%d)
  002+ microseconds do not differ enough (268)
  002- microseconds differ
```

Hence this patch reduces the threshold further.

Note that this patch should be backported to PHP 8.1 branch as well.

Closes GH-7567.
2021-10-12 00:49:21 +00:00
Derick Rethans
7af0bf4d07 Merge branch 'PHP-8.0' into PHP-8.1 2021-10-08 13:52:34 +01:00
Derick Rethans
b230593b0e Merge branch 'PHP-7.4' into PHP-8.0 2021-10-08 13:52:18 +01:00
Derick Rethans
9733d49e14 Remove now superfluous tests due to changes in tzdata 2021-10-08 13:51:21 +01:00