searxng/searxng

Use `datetime.fromisoformat` instead of `datetime.strptime`

Open

#6,098 建立於 2026年5月19日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Python (6,303 star) (864 fork)batch import
area:enginegood first issuenew feature

描述

Problem

  • We currently use something like date = datetime.strptime(date_string, "%Y-%m-%dT%H:%M:%S.%f"), although datetime.fromisoformat can handle that and is more robust

Describe the solution you'd like

  • Use datetime.fromisoformat instead.

Code of Conduct

  • I read the AI Policy and hereby confirm that this issue conforms with the policy.

貢獻者指南