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:
Anna Larch 2023-07-20 16:26:48 +02:00
parent d498f9aa38
commit 66c1aa4a3c

View File

@ -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;