From 626b0804571fb84ec83c6aaf4837b25c44407055 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 10 Feb 2009 22:25:04 +0000 Subject: [PATCH] fix sending correct time with DST / non-DST time --- src/common/connection_handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 8e74f9181..bd511ae2c 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -1640,7 +1640,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco, qp = iq_obj.setTag('time', namespace=common.xmpp.NS_TIME_REVISED) qp.setTagData('utc', strftime('%Y-%m-%dT%H:%M:%SZ', gmtime())) - zone = -(timezone, altzone)[daylight] / 60 + isdst = time.localtime().tm_isdst + zone = -(timezone, altzone)[isdst] / 60 tzo = (zone / 60, abs(zone % 60)) qp.setTagData('tzo', '%+03d:%02d' % (tzo)) self.connection.send(iq_obj)