◐ Shell
clean mode source ↗

update test_time and implement more time module by youknowone · Pull Request #7073 · RustPython/RustPython

@youknowone youknowone changed the title align time update test_time and implement more time module

Feb 11, 2026

youknowone

- Replace chrono-based gmtime/localtime/mktime/strftime/asctime/ctime
  with direct libc calls (gmtime_r, localtime_r, mktime, strftime)
  on unix, keeping chrono as fallback for non-unix platforms
- Add checked_tm_from_struct_time for struct_time field validation
- Accept None in gmtime/localtime/ctime (OptionalArg<Option<>>)
- Fix StructTimeData field order: tm_zone before tm_gmtoff
- Fix PyStructTime slot_new to accept optional dict argument

coderabbitai[bot]

This was referenced

Feb 13, 2026

youknowone added a commit to youknowone/RustPython that referenced this pull request

Mar 22, 2026
update test_time and implement more time module