pydantic / pydantic-core

Core validation logic for pydantic written in rust
MIT License
1.34k stars 207 forks source link

fix: correct `utcoffset` serialization with `zoneinfo` in `time` function #1351

Open JeanArhancet opened 1 week ago

JeanArhancet commented 1 week ago

Change Summary

This PR addresses the issue of serializing the utcoffset when using zoneinfo in the time function.

Related issue number

This can be considered the first step towards resolving issue #9571. The second step could involve adding support for timezone names.

Checklist

Selected Reviewer: @adriangb

codspeed-hq[bot] commented 1 week ago

CodSpeed Performance Report

Merging #1351 will not alter performance

Comparing JeanArhancet:fix/add-zoneinfo-utcoffset-time (67750bc) with main (0e6b377)

Summary

✅ 155 untouched benchmarks

JeanArhancet commented 1 week ago

please review

codecov[bot] commented 2 days ago

Codecov Report

Attention: Patch coverage is 90.00000% with 4 lines in your changes missing coverage. Please review. Files Patch % Lines
src/input/datetime.rs 90.00% 4 Missing :warning:

:loudspeaker: Thoughts on this report? Let us know!