aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework
diff options
context:
space:
mode:
authorAnna <anna@nextcloud.com>2024-02-13 16:17:35 +0100
committerGitHub <noreply@github.com>2024-02-13 16:17:35 +0100
commit8822b16d37de1d1a3cec959d184261152c42ae41 (patch)
tree02a66f699ea274e0f9b79a286c77b2b4cc7b6581 /lib/public/AppFramework
parent25344c2cfcad36576013f1e976ed08dd3e1773cd (diff)
parent6434ce96c946c7fa3d70f8109d88c1181c64ff81 (diff)
downloadnextcloud-server-8822b16d37de1d1a3cec959d184261152c42ae41.tar.gz
nextcloud-server-8822b16d37de1d1a3cec959d184261152c42ae41.zip
Merge pull request #41300 from nextcloud/enh/add-timezone-generator
Add timezone getter to ITimeFactory
Diffstat (limited to 'lib/public/AppFramework')
-rw-r--r--lib/public/AppFramework/Utility/ITimeFactory.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Utility/ITimeFactory.php b/lib/public/AppFramework/Utility/ITimeFactory.php
index 23f67d3dc38..be1b80ff617 100644
--- a/lib/public/AppFramework/Utility/ITimeFactory.php
+++ b/lib/public/AppFramework/Utility/ITimeFactory.php
@@ -58,4 +58,12 @@ interface ITimeFactory extends ClockInterface {
* @since 26.0.0
*/
public function withTimeZone(\DateTimeZone $timezone): static;
+
+ /**
+ * @param string|null $timezone
+ * @return \DateTimeZone Requested timezone if provided, UTC otherwise
+ * @throws \Exception
+ * @since 29.0.0
+ */
+ public function getTimeZone(?string $timezone = null): \DateTimeZone;
}