From 57710ee6e2d8a84b4f1e799d48f6b9dee5660e5e Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 19 Mar 2024 10:52:39 +0100 Subject: [PATCH] autopkgtest: Fix the date creation and comparison for time_t hack --- britney2/policies/autopkgtest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 90900a2..b365194 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -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')