The relevant code from import_dsc.py is indeed confused:
if use_time_from_changelog and len(cl._blocks) > 0: raw_timestamp = cl.date import rfc822, time time_tuple = rfc822.parsedate_tz(raw_timestamp)
if time_tuple is not None: timestamp = (time.mktime(time_tuple[:9]), time_tuple[9]) author = safe_decode(cl.author)
time.mktime works in the system’s local time zone, which in general is different from the changelog entry’s time zone. The correct calculation is
The relevant code from import_dsc.py is indeed confused:
if use_time_ from_changelog and len(cl._blocks) > 0:
raw_ timestamp = cl.date
import rfc822, time
time_ tuple = rfc822. parsedate_ tz(raw_ timestamp)
timestamp = (time.mktime( time_tuple[ :9]), time_tuple[9])
author = safe_decode( cl.author)
if time_tuple is not None:
time.mktime works in the system’s local time zone, which in general is different from the changelog entry’s time zone. The correct calculation is
timestamp = (calendar. timegm( time_tuple[ :9]) - time_tuple[9], time_tuple[9])