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 10c7622
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/public/AppFramework/Utility/ITimeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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 10c7622

Please sign in to comment.