diff options
-rw-r--r-- | sleekxmpp/plugins/xep_0202/time.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0202/time.py b/sleekxmpp/plugins/xep_0202/time.py index f944bcb3..bcad8bc8 100644 --- a/sleekxmpp/plugins/xep_0202/time.py +++ b/sleekxmpp/plugins/xep_0202/time.py @@ -32,13 +32,15 @@ class xep_0202(base_plugin): self.description = 'Entity Time'
self.stanza = stanza
+ self.tz_offset = self.config.get('tz_offset', 0)
+
# As a default, respond to time requests with the
# local time returned by XEP-0082. However, a
# custom function can be supplied which accepts
# the JID of the entity to query for the time.
self.local_time = self.config.get('local_time', None)
if not self.local_time:
- self.local_time = lambda x: xep_0082.datetime()
+ self.local_time = lambda x: xep_0082.datetime(offset=self.tz_offset)
self.xmpp.registerHandler(
Callback('Entity Time',
|