[PATCH 1 of 1] Fix: Timestamp handling in patchbomb notworking
Volker.Kleinfeld at gmx.de
Tue Sep 13 15:12:41 CDT 2005
> > - 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.
> 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)
I have to admit this is much simpler. Shouldn't the last line
offset = '%s%02d%02d' % (sign, offset / 3600, (offset % 3600) / 60)
More information about the Mercurial