diff options
author | Lance Stout <lancestout@gmail.com> | 2012-06-19 21:50:33 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-06-19 21:50:33 -0700 |
commit | 5820d49cd401a1362a8a675c4b91935adb1240fe (patch) | |
tree | f40f78839ae3004bfb0b8da1ae93d61759d8ad66 /sleekxmpp/plugins/xep_0202/time.py | |
parent | 1ab66e576786ecb0cfb9b6b163811735564b951b (diff) | |
parent | 36c11ad9de7c1b5a199aa5a4302e33085513c126 (diff) | |
download | slixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.tar.gz slixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.tar.bz2 slixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.tar.xz slixmpp-5820d49cd401a1362a8a675c4b91935adb1240fe.zip |
Merge branch 'master' into develop
Conflicts:
sleekxmpp/basexmpp.py
Diffstat (limited to 'sleekxmpp/plugins/xep_0202/time.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0202/time.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0202/time.py b/sleekxmpp/plugins/xep_0202/time.py index ca388c5b..319a9bc5 100644 --- a/sleekxmpp/plugins/xep_0202/time.py +++ b/sleekxmpp/plugins/xep_0202/time.py @@ -40,8 +40,12 @@ class XEP_0202(BasePlugin): # 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)
+
+ def default_local_time(jid):
+ return xep_0082.datetime(offset=self.tz_offset)
+
if not self.local_time:
- self.local_time = lambda x: xep_0082.datetime(offset=self.tz_offset)
+ self.local_time = default_local_time
self.xmpp.registerHandler(
Callback('Entity Time',
|