diff options
-rw-r--r-- | slixmpp/plugins/xep_0082.py | 4 | ||||
-rw-r--r-- | slixmpp/plugins/xep_0202/stanza.py | 2 | ||||
-rw-r--r-- | slixmpp/plugins/xep_0202/time.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0082.py b/slixmpp/plugins/xep_0082.py index 24436622..a0b22a2f 100644 --- a/slixmpp/plugins/xep_0082.py +++ b/slixmpp/plugins/xep_0082.py @@ -130,7 +130,7 @@ def time(hour=None, min=None, sec=None, micro=None, offset=None, obj=False): sec = now.second if micro is None: micro = now.microsecond - if offset is None: + if offset in (None, 0): offset = tzutc() elif not isinstance(offset, dt.tzinfo): offset = tzoffset(None, offset) @@ -177,7 +177,7 @@ def datetime(year=None, month=None, day=None, hour=None, sec = now.second if micro is None: micro = now.microsecond - if offset is None: + if offset in (None, 0): offset = tzutc() elif not isinstance(offset, dt.tzinfo): offset = tzoffset(None, offset) diff --git a/slixmpp/plugins/xep_0202/stanza.py b/slixmpp/plugins/xep_0202/stanza.py index d97b2fb2..4c7a0229 100644 --- a/slixmpp/plugins/xep_0202/stanza.py +++ b/slixmpp/plugins/xep_0202/stanza.py @@ -123,5 +123,5 @@ class EntityTime(ElementBase): if not isinstance(value, dt.datetime): date = xep_0082.parse(value) date = date.astimezone(tzutc()) - value = xep_0082.format_datetime(date)[:-1] + value = xep_0082.format_datetime(date) self._set_sub_text('utc', value) diff --git a/slixmpp/plugins/xep_0202/time.py b/slixmpp/plugins/xep_0202/time.py index 05df6374..e7e117a4 100644 --- a/slixmpp/plugins/xep_0202/time.py +++ b/slixmpp/plugins/xep_0202/time.py @@ -40,7 +40,7 @@ class XEP_0202(BasePlugin): } def plugin_init(self): - """Start the XEP-0203 plugin.""" + """Start the XEP-0202 plugin.""" if not self.local_time: def default_local_time(jid): |