Skip to content

Commit 09868d1

Browse files
committed
cmd-coreos-prune: replace pytz to datetime
Xerf to #273 Fix CI failed issue: ``` src/cmd-coreos-prune:39:0: E0401: Unable to import 'pytz' (import-error) ```
1 parent 7a9b9a8 commit 09868d1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cmd-coreos-prune

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import argparse
3636
import json
3737
import subprocess
3838
from urllib.parse import urlparse
39-
import pytz
4039
import requests
4140
import yaml
4241
import collections
@@ -273,7 +272,7 @@ def get_json_from_s3(s3, bucket, key):
273272

274273

275274
def save_builds_json(builds_json_data, location):
276-
builds_json_data["timestamp"] = datetime.datetime.now(pytz.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
275+
builds_json_data["timestamp"] = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
277276
with open(location, "w") as json_file:
278277
json.dump(builds_json_data, json_file, indent=4)
279278

0 commit comments

Comments
 (0)