##// END OF EJS Templates
patchbomb does not handle email time stamp plattform independent
Volker Kleinfeld -
r2443:bd9c39e8 default
parent child Browse files
Show More
@@ -217,7 +217,14 b' def patchbomb(ui, repo, *revs, **opts):'
217 if not opts['test'] and not opts['mbox']:
217 if not opts['test'] and not opts['mbox']:
218 mail = ui.sendmail()
218 mail = ui.sendmail()
219 parent = None
219 parent = None
220 tz = time.strftime('%z')
220
221 # Calculate UTC offset
222 if time.daylight: offset = time.altzone
223 else: offset = time.timezone
224 if offset <= 0: sign, offset = '+', -offset
225 else: sign = '-'
226 offset = '%s%02d%02d' % (sign, offset / 3600, (offset % 3600) / 60)
227
221 sender_addr = email.Utils.parseaddr(sender)[1]
228 sender_addr = email.Utils.parseaddr(sender)[1]
222 for m in msgs:
229 for m in msgs:
223 try:
230 try:
@@ -228,7 +235,8 b' def patchbomb(ui, repo, *revs, **opts):'
228 m['In-Reply-To'] = parent
235 m['In-Reply-To'] = parent
229 else:
236 else:
230 parent = m['Message-Id']
237 parent = m['Message-Id']
231 m['Date'] = time.strftime('%a, %e %b %Y %T ', time.localtime(start_time)) + tz
238 m['Date'] = time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime(start_time)) + ' ' + offset
239
232 start_time += 1
240 start_time += 1
233 m['From'] = sender
241 m['From'] = sender
234 m['To'] = ', '.join(to)
242 m['To'] = ', '.join(to)
General Comments 0
You need to be logged in to leave comments. Login now