strftime doesn't support %T. It works under linux (why?) but not under windows. Fixes #4526

This commit is contained in:
Yann Leboulanger 2008-12-01 10:56:14 +00:00
parent 27bc3bba1a
commit 3a548491a9
2 changed files with 3 additions and 3 deletions

View File

@ -1175,7 +1175,7 @@ class Connection(ConnectionHandlers):
if delayed: if delayed:
our_jid = gajim.get_jid_from_account(self.name) + '/' + \ our_jid = gajim.get_jid_from_account(self.name) + '/' + \
self.server_resource self.server_resource
timestamp = time.strftime('%Y-%m-%dT%TZ', time.gmtime(delayed)) timestamp = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(delayed))
msg_iq.addChild('delay', namespace=common.xmpp.NS_DELAY2, msg_iq.addChild('delay', namespace=common.xmpp.NS_DELAY2,
attrs={'from': our_jid, 'stamp': timestamp}) attrs={'from': our_jid, 'stamp': timestamp})

View File

@ -1579,7 +1579,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
return return
iq_obj = iq_obj.buildReply('result') iq_obj = iq_obj.buildReply('result')
qp = iq_obj.getTag('query') qp = iq_obj.getTag('query')
qp.setTagData('utc', strftime('%Y%m%dT%T', gmtime())) qp.setTagData('utc', strftime('%Y%m%dT%H:%M:%S', gmtime()))
qp.setTagData('tz', helpers.decode_string(tzname[daylight])) qp.setTagData('tz', helpers.decode_string(tzname[daylight]))
qp.setTagData('display', helpers.decode_string(strftime('%c', qp.setTagData('display', helpers.decode_string(strftime('%c',
localtime()))) localtime())))
@ -1593,7 +1593,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
iq_obj = iq_obj.buildReply('result') iq_obj = iq_obj.buildReply('result')
qp = iq_obj.setTag('time', qp = iq_obj.setTag('time',
namespace=common.xmpp.NS_TIME_REVISED) namespace=common.xmpp.NS_TIME_REVISED)
qp.setTagData('utc', strftime('%Y-%m-%dT%TZ', gmtime())) qp.setTagData('utc', strftime('%Y-%m-%dT%H:%M:%SZ', gmtime()))
zone = -(timezone, altzone)[daylight] / 60 zone = -(timezone, altzone)[daylight] / 60
tzo = (zone / 60, abs(zone % 60)) tzo = (zone / 60, abs(zone % 60))
qp.setTagData('tzo', '%+03d:%02d' % (tzo)) qp.setTagData('tzo', '%+03d:%02d' % (tzo))