fix(datetime): only complete an hour-only UTC offset in the parse fallback - #1350
fix(datetime): only complete an hour-only UTC offset in the parse fallback#1350Aryan-Pardeshi wants to merge 1 commit into
Conversation
…lback parse() appended ":00" to any string the format list rejected. The retry exists to turn a trailing "+01" into "+01:00", but unguarded it also completed truncated datetimes: "2024-06-15 12" became "2024-06-15 12:00" and "2024-06-15T12:30" became "2024-06-15T12:30:00", both of which then matched. Local mode therefore accepted datetimes qdrant core rejects. Guard the retry on the string actually ending in an hour-only offset. Fixes: qdrant#1349
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #1349
parse()ends with an unguarded retry that appends:00to any string the format list rejected:It exists to turn a trailing
+01into+01:00, but it also completes truncated datetimes:2024-06-15 122024-06-15 12:00%Y-%m-%d %H:%M2024-06-15T12:302024-06-15T12:30:00%Y-%m-%dT%H:%M:%SNeither input is an accepted format — not in
available_formats, not in core's list — so local mode accepted values a real instance rejects, and read2024-06-15 12as12:00:00instead of surfacing it as invalid.The retry is now guarded on the string actually ending in an hour-only offset (
HH:MM[:SS][.fff]±HH).Tests
New
tests/test_datetime_utils.py:+05:00conversion+HHcompletion the fallback exists for still works (...000+01,...000-10,T12:30:45+05)2024-06-15 12and2024-06-15T12:30now returnNone— these two fail ondevNonetests/test_in_memory.pyandtests/test_common.pypass unchanged.