Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

fixtureless_integrations: Use `<time:>` syntax only via the helper.

Niloth P7e9d0515060a
diff --git a/zerver/webhooks/fixtureless_integrations.py b/zerver/webhooks/fixtureless_integrations.py
index 2782a8bfab2..e89c44da273 100644
--- a/zerver/webhooks/fixtureless_integrations.py
+++ b/zerver/webhooks/fixtureless_integrations.py
@@ -1,6 +1,8 @@
from datetime import datetime, timezone
from typing import TypedDict
+from zerver.lib.timestamp import datetime_to_global_time
+
# For integrations that don't have example webhook fixtures/payloads,
# we create an Zulip notification message content and topic here in
# order to generate an example screenshot to include in the documentation
@@ -50,7 +52,7 @@ TICKET_NUMBER = THREE_DIGIT_NUMBER
# Example datetime content
_DT = datetime(2025, 5, 30, 2, 0, 0, tzinfo=timezone.utc)
-DATETIME_GLOBAL = f"<time:{_DT}>"
+DATETIME_GLOBAL = datetime_to_global_time(_DT)
DATE_ISO_8601 = _DT.strftime("%Y-%m-%d")
DATE_LONG = _DT.strftime("%A, %B %d, %Y")