searxng/searxng

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

已關閉

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

 (5 則留言) (0 個反應) (0 位負責人)Python (864 個分叉)batch import
area:enginegood first issuenew feature

倉庫指標

星標
 (6,303 顆星)
PR 合併指標
 (平均合併 3天 14小時) (30 天內合併 112 個 PR)

描述

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.

貢獻者指南