mirror of
https://github.com/nextcloud/server.git
synced 2024-07-31 08:15:55 +02:00
fix(utility): De- deprecate getDateTime as now() only returns immutable objects
This will mean lots of code like ```$dateTime = (new DateTime())->setTimestamp(ITimeFactory::now()->getTimestamp()``` if a regular DateTime object is needed Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
d498f9aa38
commit
66c1aa4a3c
@ -41,7 +41,6 @@ interface ITimeFactory extends ClockInterface {
|
||||
/**
|
||||
* @return int the result of a call to time()
|
||||
* @since 8.0.0
|
||||
* @deprecated 26.0.0 {@see ITimeFactory::now()}
|
||||
*/
|
||||
public function getTime(): int;
|
||||
|
||||
@ -50,7 +49,6 @@ interface ITimeFactory extends ClockInterface {
|
||||
* @param \DateTimeZone|null $timezone
|
||||
* @return \DateTime
|
||||
* @since 15.0.0
|
||||
* @deprecated 26.0.0 {@see ITimeFactory::now()}
|
||||
*/
|
||||
public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user