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
Nikita Popov
494615fcb8
Fix leak in DateTimeImmutable::modify()
2020-01-30 12:16:56 +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
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
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
f53b8268d6
Merge branch 'PHP-7.2' into PHP-7.3
2019-09-19 11:36:09 +02:00
CJDennis
e3255a4f49
Fix typo
...
`sizeof("data")-1` and `sizeof("date")-1` are both 4, so no change in behaviour
2019-09-19 11:36:00 +02:00
Joe Watkins
264536877d
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
export php_time
2019-06-19 12:40:23 +02:00
Joe Watkins
599b94ff14
export php_time
2019-06-19 12:39:51 +02:00
Joe Watkins
025899e3b5
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044
2019-06-19 08:59:04 +02:00
Joe Watkins
65067dff01
Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044
2019-06-19 08:56:20 +02:00
Craig Duncan
370997fb5d
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Add a test for bug #65672
Ensure the internal properties cannot be overwritten
2019-05-30 18:55:55 +01:00
Craig Duncan
dc586bff36
Ensure the internal properties cannot be overwritten
2019-05-30 18:55:36 +01:00
Derick Rethans
6088713216
Merge branch 'PHP-7.2' into PHP-7.3
2019-04-17 09:40:18 +01:00
Ignace Nyamagana Butera
7b1a4e2400
Fixed bug #77909 : DatePeriod::__construct() with invalid recurrence count value
...
Improve error message on invalid reccurence count
Adding test when reccurence is -1
2019-04-17 09:39:03 +01:00
Nikita Popov
00cfa1a367
Merge branch 'PHP-7.2' into PHP-7.3
2019-03-18 10:11:25 +01:00
Nikita Popov
a573c0e9ed
Fix unused variable warning
2019-03-18 10:11:00 +01:00
Derick Rethans
d209ccd4cc
Merge branch 'PHP-7.2' into PHP-7.3
2019-03-17 14:55:53 -04:00
Derick Rethans
ab07bc1fff
Fixed 7.2 compat issue
2019-03-17 14:53:56 -04:00
Derick Rethans
7e7ef44fab
Merge branch 'PHP-7.2' into PHP-7.3
2019-03-17 14:38:04 -04:00
Ignace Nyamagana Butera
6eb83a63e1
Fixed bug #75113 : Added DatePeriod::getRecurrences() method.
2019-03-17 14:37:35 -04:00
Derick Rethans
d63a7aa6cf
Merge branch 'PHP-7.2' into PHP-7.3
2019-02-28 13:51:10 +00:00
Derick Rethans
a890c5beb8
Fixed bug #50020 (DateInterval:createDateFromString() silently fails)
2019-02-28 13:50:35 +00:00
Nikita Popov
8ed775f548
Merge branch 'PHP-7.2' into PHP-7.3
2019-02-12 09:57:18 +01:00
Nikita Popov
a109fddba4
Remove "defensive copy" of DatePeriod properties
...
get_properties() constructs these as fresh objects with no relation
to the internals, there is no need to clone them again. Additionally
the current implementation leaks memory, because the original objects
are never freed (see PR #3121 ).
2019-02-12 09:54:52 +01:00
Derick Rethans
a9a084c092
Update API use due to changes in timelib 2018.01RC3
2018-12-23 17:54:57 +00:00
Christoph M. Becker
e68f60b087
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #75851 : Year component overflow with date formats "c", "o", "r" and "y"
2018-10-08 11:52:37 +02:00
Christoph M. Becker
1b97f291a7
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix #75851 : Year component overflow with date formats "c", "o", "r" and "y"
2018-10-08 11:50:37 +02:00
Adam Saponara
c097acd52e
Fix #75851 : Year component overflow with date formats "c", "o", "r" and "y"
2018-10-08 11:48:58 +02:00
Peter Kokot
8d3f8ca12a
Remove unused Git attributes ident
...
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
7d4e18b05d
Improved user iterator implementation to reduce zend_class_entry memory consumption and avoid race condition during resolving/caching of user iterator functions of internal classes in ZTS build.
2018-07-12 14:04:14 +03:00
Dmitry Stogov
b6cc4d2009
Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code)
2018-07-05 11:54:26 +03:00
Dmitry Stogov
4a475a4976
Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
...
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Anatol Belski
c9fc0095ce
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fixed bug #76462 Undefined property: DateInterval::$f
2018-06-12 15:31:49 +02:00
Anatol Belski
5f1190684f
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed bug #76462 Undefined property: DateInterval::$f
2018-06-12 15:31:01 +02:00
Anatol Belski
7212829435
Fixed bug #76462 Undefined property: DateInterval::$f
2018-06-12 15:30:14 +02:00
Nikita Popov
befc518c82
Merge branch 'PHP-7.2'
2018-06-08 23:11:45 +02:00
Nikita Popov
e029019275
Deduplicate code using php_timezone_to_string()
...
Looks like this usage was overlooked when the function was
introduced.
2018-06-08 23:10:43 +02:00
David Carlier
ad52ec3db8
cast to int to disable compilation warnings.
2018-06-08 23:08:42 +02:00
Dmitry Stogov
f2b4ec4bdc
Export standard object handlers, to avoid indirect access
2018-05-31 11:57:22 +03:00
Pavel Kovář
11b5ec491f
Export php_date_get_interval_ce() and php_date_get_period_ce() for extension use
2018-05-23 21:04:07 +02:00
Dmitry Stogov
524f5245c5
Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string.
2018-05-08 17:30:15 +03:00
Joe Watkins
f37e95a443
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fix #76131 some arginfo params are different from the documentation
2018-03-27 22:00:31 +02:00
Joe Watkins
3e267ca91b
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix #76131 some arginfo params are different from the documentation
2018-03-27 21:58:24 +02:00
Gabriel Caruso
63934ea71e
Fix #76131 some arginfo params are different from the documentation
2018-03-27 21:56:46 +02:00
Gabriel Caruso
caa32517ba
Use ZEND_ARG_ARRAY_INFO in DateTime*::__set_state
2018-03-23 18:58:42 +01:00
Christoph M. Becker
ef255c9f0f
Revert "[ci skip] Add missing return types to protos"
...
This reverts commit a2c7c46d5e .
Since apparently there have been some mistakes in this commit, and it's
not clear yet how to solve them, we're reverting for now.
2018-02-27 17:40:03 +01:00
Gabriel Caruso
a2c7c46d5e
[ci skip] Add missing return types to protos
2018-02-24 11:45:17 +01:00