Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
3bdc6c1c by Philipp Hörist at 2026-04-19T19:09:58+02:00
cfix: EntityTime: %:z is only available in python 3.12

- - - - -


1 changed file:

- nbxmpp/modules/entity_time.py


Changes:

=====================================
nbxmpp/modules/entity_time.py
=====================================
@@ -98,7 +98,8 @@ def get_local_time() -> tuple[str, str]:
     if local.utcoffset() == utc.utcoffset():
         offset = "Z"
     else:
-        offset = local.strftime("%:z")
+        # %z has the format ±HHMM[SS[.ffffff]]
+        offset = local.strftime("%z")[:5]
         offset = f"{offset[:-2]}:{offset[-2:]}"
     return utc_formated, offset
 



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3bdc6c1cbae0dc3b73901d8ca5da1a6af1efd44c

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3bdc6c1cbae0dc3b73901d8ca5da1a6af1efd44c
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to