Commit a4a1a7e
committed
tools/checkcerts.py: fix deprecated datetime.datetime.utcnow()
The replacement, datetime.datetime.now(datetime.UTC), returns a
tz-aware item, so the expiry time must also be timezone-aware.
datetime.strptime() does not handle that time format sanely.
I don't know why. The code seems to require a gmtoffset along with
the timezone name (so what's the point of the timezone name). Shrug.
Supply it one for GMT. If we ever get a certificate whose expiry
date is not in GMT, it'll be a problem.
Signed-off-by: Dan Mick <dan.mick@redhat.com>1 parent cf9d52c commit a4a1a7e
1 file changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
0 commit comments