Skip to content

Commit

Permalink
fix(utility): De- deprecate getDateTime as now() only returns immutab…
Browse files Browse the repository at this point in the history
…le 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 <[email protected]>
  • Loading branch information
miaulalala committed Aug 25, 2023
1 parent d498f9a commit 66c1aa4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/public/AppFramework/Utility/ITimeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -50,7 +49,6 @@ public function getTime(): int;
* @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;

Expand Down

0 comments on commit 66c1aa4

Please sign in to comment.