Skip to content

Commit

Permalink
fix: handling of date with python 3.9/3.10
Browse files Browse the repository at this point in the history
use a function working on 3.9+
  • Loading branch information
benoitf committed Feb 28, 2025
1 parent dc25be9 commit 9ed5d4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ramalama/oci.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def list_models(args):
models += list_manifests(args)
for model in models:
# Convert to ISO 8601 format
parsed_date = datetime.fromisoformat(model["modified"].replace(" UTC", "").replace(" ", "T"))
parsed_date = datetime.fromisoformat(model["modified"].replace(" UTC", "").replace("+0000", "+00:00").replace(" ", "T"))
model["modified"] = parsed_date.isoformat()

return models
Expand Down

0 comments on commit 9ed5d4e

Please sign in to comment.