Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Z zodbtools
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 4
    • Merge requests 4
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • nexedi
  • zodbtools
  • Merge requests
  • !35

Closed
Created Jun 24, 2025 by Xiaowu Zhang@xiaowu.zhangDeveloper
  • Report abuse
Report abuse

Draft: util.py: add system timezone in setting so it can parse corretly

  • Overview 8
  • Commits 2
  • Changes 0

when update dateparser to 1.2.0, we have 3 tests failed:

  1. 2009-08-30T01:00:00Z 03805a7c00000000 3:00

    parse(3:00) return 2009-08-30 02:51:00+00:00

  2. 2009-08-30T13:00:00Z 03805d4c00000000 15:00

    parse(15:00) return 2009-08-30 14:51:00+00:00

  3. 2009-06-07T04:00:00Z 037e7d1000000000 6AM, June 7, 2009

    parse("6AM, June 7, 2009") return 2009-06-07 05:51:00+00:00

probably it's because of dateparser's fuzzy parsing changed and return something weird like 51 minutes

by adding system timezone in setting, parse become more accurate and can corretly parse those

Edited Jun 24, 2025 by Xiaowu Zhang
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: dateparser_version_up
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7