]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(utility): De- deprecate getDateTime as now() only returns immutable objects 40039/head
authorAnna Larch <anna@nextcloud.com>
Thu, 20 Jul 2023 14:26:48 +0000 (16:26 +0200)
committerAnna <anna@nextcloud.com>
Mon, 28 Aug 2023 10:44:11 +0000 (12:44 +0200)
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>
lib/public/AppFramework/Utility/ITimeFactory.php

index 7a6acf97b2d5c41fac87f3f7803ea51235cdfc3e..d4f74c9d1071b552c16973e714c16ecbfbee25e2 100644 (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;