autopkgtest: Fix the date creation and comparison for time_t hack

less-recipients
Michael Hudson-Doyle 10 months ago committed by Julian Andres Klode
parent 50d59b67db
commit 57710ee6e2

@ -19,7 +19,7 @@
import calendar
import collections
from copy import deepcopy
from datetime import datetime
from datetime import datetime, date
from enum import Enum
import os
import json
@ -1133,7 +1133,7 @@ class AutopkgtestPolicy(BasePolicy):
qname = 'debci-%s-%s' % (self.options.series, arch)
# FIXME: Remove after the time_t transition
if (arch == "armhf" and self.options.series == "noble" and
datetime.utcnow() < datetime.date(2024, 4, 4)):
datetime.utcnow().date() < date(2024, 4, 4)):
params["all-proposed"] = "1"
params['submit-time'] = datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S%z')

Loading…
Cancel
Save