Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds precision option for datetime fields, reverts new default functionality from v4.1.1 and makes it opt-in #71

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

fusion2004
Copy link
Contributor

Fields using the time/timestamp/datetime caster will now default back to the old behavior, and use a precision: option to opt-in to the new behavior introduced in v4.1.1.

precision: :seconds will retain the old behavior of always parsing to a new Time object
with floored sub-second precision, but applied more forcefully than before as it would have parsed whatever you passed to it. (This is the default, now.)

precision: :high will now use the new functionality of re-using Time objects when they
are passed in, or if not parsing exactly the provided string as to a Time object.

@fusion2004 fusion2004 force-pushed the opt-into-high-precision-datetime-field-casting branch from c1b6b3a to 4ff2217 Compare November 11, 2024 18:21
@fusion2004 fusion2004 merged commit 6aeeb22 into main Nov 11, 2024
3 checks passed
@fusion2004 fusion2004 deleted the opt-into-high-precision-datetime-field-casting branch November 11, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants