Christoph M. Becker
6b6f0d63f3
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #74940 : DateTimeZone loose comparison always true
2020-03-30 09:18:20 +02:00
Christoph M. Becker
a2f8c78183
Fix #74940 : DateTimeZone loose comparison always true
...
Since `DateTimeZone` does not implement a `compare_objects` handler,
nor has any properties, two `DateTimeZone` instances always compare as
being equal, even if they designate totally different timezones. Even
worse, after calling `var_dump()` on these objects, the actual
comparison may yield a correct result.
We therefore introduce a `compare_objects` handlers, which prevents
different behavior before/after `var_dump()`, and which allows us to
clearly define the intended semantics.
2020-03-30 09:03:40 +02:00
Christoph M. Becker
8ea143a943
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79396 : DateTime hour incorrect during DST jump forward
2020-03-19 08:53:46 +01:00
Christoph M. Becker
1d9e716a47
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79396 : DateTime hour incorrect during DST jump forward
2020-03-19 08:51:55 +01:00
Nate Brunette
d70058a139
Fix #79396 : DateTime hour incorrect during DST jump forward
...
When you attempt to set the time to a non-existent time occuring during
a DST jump forward, the hour does not move forward correctly.
2020-03-19 08:50:34 +01:00
Máté Kocsis
960318ed95
Change argument error message format
...
Closes GH-5211
2020-02-26 15:00:08 +01:00
Máté Kocsis
ac0853eb26
Make type error messages more consistent
...
Closes GH-5092
2020-02-17 14:22:17 +01:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Nikita Popov
a66e226713
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix DatePeriod property handling with indirect modification
2020-01-30 13:14:29 +01:00
Nikita Popov
01d30f880a
Fix DatePeriod property handling with indirect modification
...
We do need to implement get_property_ptr_ptr to make arrays work
correctly.
2020-01-30 13:09:47 +01:00
Nikita Popov
0078727866
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix leak in DateTimeImmutable::modify()
2020-01-30 12:17:15 +01:00
Nikita Popov
187f359549
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix leak in DateTimeImmutable::modify()
2020-01-30 12:17:10 +01:00
Nikita Popov
494615fcb8
Fix leak in DateTimeImmutable::modify()
2020-01-30 12:16:56 +01:00
Nikita Popov
472fc3a2a9
Fix leak in DatePeriod construction with invalid format
...
Same issue as I fixed in DateInterval construction before.
2020-01-30 11:13:04 +01:00
Nikita Popov
648f16c2ec
Fix rel_date leak on DateInterval construction failure
2020-01-28 13:11:49 +01:00
Máté Kocsis
99db00b1f2
Fix #78880 Another round
2020-01-19 18:28:43 +01:00
Máté Kocsis
afdaa91170
Fix #78880 : Final spelling fixes
2020-01-16 19:14:31 +01:00
mike
1658b5babc
Adding DateTime(Immutable)::createFromInterface()
...
These are like
DateTime::createFromImmutable()
DateTimeImmutable::createFromMutable()
but accept any DateTimeInterface instead.
Closes GH-5016.
2020-01-03 16:55:12 +01:00
Christoph M. Becker
1400f4ac12
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79015 : undefined-behavior in php_date.c
2020-01-03 14:32:56 +01:00
Christoph M. Becker
40b2f82380
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79015 : undefined-behavior in php_date.c
2020-01-03 14:32:30 +01:00
Christoph M. Becker
b48f2625b5
Fix #79015 : undefined-behavior in php_date.c
...
We check that the given microsecond fraction is in the valid range
[0, 1000000[, and otherwise mark it as invalid. We also drop the
useless do loop; a plain block is sufficient here.
2020-01-03 14:31:03 +01:00
Christoph M. Becker
dabc28d182
Fix #78880 : Spelling error report
...
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.
[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html >.
2019-12-21 11:58:00 +01:00
Nikita Popov
69eaddabf8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove DateTime class registration test
2019-12-16 18:57:47 +01:00
Nikita Popov
8e12f04b5e
Remove DateTime class registration test
...
This test is more annoying than useful.
2019-12-16 18:57:19 +01:00
Fabien Villepinte
a555cc0b3d
Clean DONE tags from tests
...
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.
Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
f9a98f6dbd
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:09:44 +01:00
Christoph M. Becker
9e4c5db733
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:09:24 +01:00
Christoph M. Becker
736cd93ef5
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:08:34 +01:00
Christoph M. Becker
89c327f884
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
...
When getting the properties of a DatePeriod instance we have to retain
the proper classes, and when restoring a DatePeriod instance we have to
cater to DateTimeImmutable instances as well.
2019-10-28 13:07:28 +01:00
Christoph M. Becker
43a1363a05
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix test case
2019-10-18 16:24:14 +02:00
Christoph M. Becker
81806db90b
Fix test case
...
Cf. <https://github.com/php/php-src/pull/4687 >.
2019-10-18 16:23:56 +02:00
Christoph M. Becker
2484f1e88a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:33:58 +02:00
Christoph M. Becker
197568d634
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:33:25 +02:00
Christoph M. Becker
c7c7ab53ac
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:32:08 +02:00
m.yakunin
d2cde0bfd3
Fix #70153 \DateInterval incorrectly unserialized
...
Added a separate macro for reading 'days' property, so that bool(false)
is correctly converted to the proper internal representation.
2019-10-18 15:31:14 +02:00
Nikita Popov
2f92957fd3
Convert some notices to warnings
...
Part of https://wiki.php.net/rfc/engine_warnings .
2019-10-02 10:34:08 +02:00
Nikita Popov
235983dfde
Merge branch 'PHP-7.4'
2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4
Fix borked SKIPIFs
2019-09-30 17:51:41 +02:00
Nikita Popov
3b2f2ce474
Make uninitialized DateTime an Error
...
This avoids many spurious false return values.
2019-08-09 14:51:25 +02:00
Matteo Beccati
13980414eb
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix test when default TZ is not UTC
2019-08-09 09:58:36 +02:00
Matteo Beccati
00dd786ba4
Fix test when default TZ is not UTC
2019-08-09 09:58:10 +02:00
Nikita Popov
527dad600b
Merge branch 'PHP-7.4'
2019-08-08 09:56:10 +02:00
Nikita Popov
fc17bfaacf
Fixed bug #78383
2019-08-08 09:55:52 +02:00
Christoph M. Becker
7556600dfc
Fix #65547 : Default value for sunrise/sunset zenith still wrong
...
The value of the zenith angle to calculate sunrise and sunset times is
commonly defined as 90°50', and is "obtained by adding the average
apparent radius of the Sun (16') to the average amount of atmospheric
refraction at the horizon (34')", according to
http://aa.usno.navy.mil/faq/docs/RST_defs.php .
This value is also used for the Sunrise/Sunset Algorithm published in
the Almanac for Computers, 1990, see
https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm .
2019-07-15 13:52:09 +02:00
Nikita Popov
bbd12b3d30
Merge branch 'PHP-7.4'
2019-07-10 11:11:30 +02:00
Nikita Popov
9d82a01d01
Clean up DateTimeZone::getLocation() test
...
And avoid invalid array access.
2019-07-10 11:09:41 +02:00
Derick Rethans
73734eee6c
Merge branch 'PHP-7.4'
2019-06-30 15:51:04 +01:00
Derick Rethans
a60128c503
Merge branch 'PHP-7.3' into PHP-7.4
2019-06-30 15:50:55 +01:00
Derick Rethans
cc3fe3bd30
Fixed tests due to changed timezone data
2019-06-30 15:50:38 +01:00
Nikita Popov
4d90848d68
Don't verify arginfo types for internal functions
...
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.
Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00