[PATCH 1 of 1] Fix: Timestamp handling in patchbomb not
working in windows
bos at serpentine.com
Tue Sep 13 14:55:32 CDT 2005
On Tue, 2005-09-13 at 08:40 +0200, Volker Kleinfeld wrote:
> - The time formatting string in patchbomb is not plattform independent.
> - Changed to a plattform independent formatting string and a
> plattform independent way to calculate the different to UTC time.
Thanks. Unfortunately, the timezone calculation seems enormously
complicated to me.
Why not just use something like this:
if time.daylight: offset = time.altzone
else: offset = time.timezone
if offset < 0: sign, offset = '+', -offset
else: sign = '-'
offset = '%s%s%s' % (sign, offset / 3600, (offset % 3600) / 60)
More information about the Mercurial