1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 04:02:19 +02:00
Commit Graph

1236 Commits

Author SHA1 Message Date
Christoph M. Becker
f9453a889d Fix GH-14732: date_sun_info() fails for non-finite values
`timelib_astro_rise_set_altitude()` is not prepared to deal with non-
finite values (`nan`, `inf` and `-inf`) for `lon` and `lat`; instead
these trigger undefined behavior.  Thus we catch non-finite values
before even calling that timelib function; for `date_sun_info()` we
trigger `ValueError`s; for `date_sunrise()` and `date_sunset()` we
silently return `false`, since these functions will be sunsetted
anyway.

Closes GH-16497.
2024-11-01 23:46:19 +01:00
Derick Rethans
b2b294a2b2 Fixed bug GH-16037 (Assertion failure in ext/date/php_date.c) 2024-10-18 12:37:03 +01:00
Christoph M. Becker
9bc34182b6 Fix GH-16454: Unhandled INF in date_sunset() with tiny $utcOffset
After normalization, `N` is supposed to be in range [0, 24], but for
very large and very small `$utcOffset` this is not necessarily the
case, since the normalization might yied `-inf` or `inf`.  If that
happens, we let the function fail silently, since it is highly unlikely
that such `$utcOffset`s are passed in practice.

Closes GH-16483.
2024-10-18 13:21:57 +02:00
Derick Rethans
8a8859bce7 Fixed regression: Using more than one sign is now OK again when using modify() 2024-09-11 17:43:23 +01:00
Derick Rethans
f752e23cff Fix GH-15582: Crash when not calling parent constructor of DateTimeZone 2024-09-11 16:37:40 +01:00
Matteo Beccati
5373f5dd9d Fix test on non-UTC environments 2024-02-19 15:18:48 +01:00
Derick Rethans
c7816bf730 tzdata 2023d adds an extra transition for Europe/London 2024-01-02 11:07:12 +00:00
Derick Rethans
b71d2e16e6 Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in (PHP 8.2+) 2023-08-09 16:10:14 +01:00
Derick Rethans
7f6e98cec7 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-09 15:39:25 +01:00
Derick Rethans
4833b84854 Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in 2023-08-09 15:39:13 +01:00
Derick Rethans
a8f4171655 Fixed bug GH-11854 (DateTime:createFromFormat stopped parsing datetime with extra space) 2023-08-03 09:52:34 +01:00
Ilija Tovilo
57229836d4 Fix bug-gh11600.phpt 2023-07-12 14:54:56 +02:00
Ilija Tovilo
892704267c [skip ci] Mark bug-gh11600 as xfail 2023-07-12 14:08:28 +02:00
Niels Dossche
9c47f33a5f Fix bug-gh11600.phpt to work with different ICU versions 2023-07-12 10:35:59 +02:00
Derick Rethans
a4bdaeabf6 Fix bug GH-11600: Can't parse time strings which include (narrow) non-breaking space characters 2023-07-11 16:29:04 +01:00
Derick Rethans
1b5360587e Merge branch 'PHP-8.1' into PHP-8.2 2023-06-22 19:06:08 +01:00
Derick Rethans
0747616f84 Fixed GH-11368: Date modify returns invalid datetime 2023-06-22 17:58:19 +01:00
Niels Dossche
93becab506 Fix GH-11455: Segmentation fault with custom object date properties
Closes GH-11473.
2023-06-19 19:42:09 +02:00
nielsdos
caab608d57 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11281: DateTimeZone::getName() does not include seconds in offset
2023-05-23 18:56:40 +02:00
Niels Dossche
f9117eb824 Fix GH-11281: DateTimeZone::getName() does not include seconds in offset
If the seconds portion is non-zero, include the seconds in the output.

Closes GH-11282.
2023-05-23 18:52:07 +02:00
Derick Rethans
cc7b799c44 Fixed tests 2023-04-18 13:46:07 +01:00
Derick Rethans
d3f82f30b7 Merge branch 'PHP-8.1' into PHP-8.2 2023-04-12 11:39:02 +01:00
Derick Rethans
e67bb14ab4 Fixed tests and remove the XFAIL 'Various bugs exist'. They did, but they were in the tests 2023-04-07 23:50:55 +01:00
Derick Rethans
50ca489aa5 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-23 14:49:18 +00:00
Derick Rethans
cbac68df6b Fix GH-10583: DateTime modify with tz pattern should not update linked timezone 2023-03-23 11:46:31 +00:00
Remi Collet
f575027b56 avoid test file being consider binary 2023-03-14 15:54:38 +01:00
Derick Rethans
2d3aa8a5c4 Fixed test for GH-10147 2023-03-13 11:23:40 +00:00
Derick Rethans
ce5f75fb6f Fixed oss-fuzz #56931 2023-03-13 09:38:11 +00:00
Ilija Tovilo
cc902530f2 [skip ci] Mark failing date test as xfail 2023-03-10 17:33:56 +01:00
Derick Rethans
a225581833 Fix GH-10747: Private and protected properties in serialized Date* objects throw 2023-03-10 14:39:22 +00:00
Derick Rethans
5d9ee8f920 Fixed OSS fuzz issues #55589, #55599, and #55727 2023-02-10 13:03:47 +00:00
Derick Rethans
cb907d50a8 Merge branch 'PHP-8.1' into PHP-8.2 2023-01-31 13:00:06 +00:00
Derick Rethans
a42bf93308 Fixed GH-10447: 'p' format specifier does not yield 'Z' for 00:00 2023-01-31 12:58:21 +00:00
Derick Rethans
85fbc6eaa6 Fix GH-10152: Custom properties of Date's child classes are not serialised 2023-01-31 12:53:03 +00:00
Derick Rethans
f340854a30 Merge branch 'PHP-8.1' into PHP-8.2 2023-01-10 15:16:32 +00:00
Derick Rethans
d12ba111e0 Fixed GH-10218: DateTimeZone fails to parse time zones that contain the "+" character 2023-01-10 15:15:49 +00:00
Derick Rethans
6b212b6dee Merge branch 'PHP-8.1' into PHP-8.2 2022-12-20 16:06:55 +00:00
Derick Rethans
d19a70c9a0 Fix GH-9891: DateTime modify with unixtimestamp (@) must work like setTimestamp 2022-12-20 14:41:13 +00:00
Derick Rethans
1316a5b8fb Merge branch 'PHP-8.1' into PHP-8.2 2022-12-01 11:08:38 +00:00
Derick Rethans
83b714d788 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-30 15:55:46 +00:00
Derick Rethans
d021851171 Fixed GH-9699, GH-9866, and GH-9880 (problems with diff); and GH-9700 (greedy tzid parsing) 2022-11-30 15:47:43 +00:00
Derick Rethans
818b46acb0 Import timelib 2021.18 2022-11-30 15:42:11 +00:00
Ilija Tovilo
d0190532f3 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix failing date test
2022-10-20 10:50:03 +02:00
Ilija Tovilo
4e8a6554cb Fix failing date test
INCLUDE_END_DATE has only been introduced in PHP 8.2.
2022-10-20 10:48:57 +02:00
Derick Rethans
0a1a9997c7 Merge branch 'PHP-8.1' into PHP-8.2 2022-10-19 16:03:02 +01:00
Derick Rethans
df085f4678 Merge branch 'PHP-8.0' into PHP-8.1 2022-10-19 16:02:57 +01:00
Derick Rethans
011b7f9840 Test for bug #78055 (DatePeriod's getRecurrences and ->recurrences don't match) 2022-10-19 16:02:49 +01:00
Derick Rethans
2e6b317fe3 Merge branch 'PHP-8.1' into PHP-8.2 2022-10-17 18:22:42 +01:00
Derick Rethans
25744dd73c Merge branch 'PHP-8.0' into PHP-8.1 2022-10-17 18:22:36 +01:00
Derick Rethans
7b48053293 Fixed GH-9763: DateTimeZone ctr mishandles input and adds null byte if the argument is an offset larger than 100*60 minutes 2022-10-17 17:08:44 +01:00