From 33f5d8fc32a21c44055e9187031b861d31c342fd Mon Sep 17 00:00:00 2001 From: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Date: Thu, 15 Feb 2024 07:53:32 -0600 Subject: [PATCH] `date` string coerced to `datetime` shouldn't infer timezone (#1193) --- src/validators/datetime.rs | 3 +-- tests/validators/test_datetime.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/validators/datetime.rs b/src/validators/datetime.rs index 8779ea76c..94dc7ba05 100644 --- a/src/validators/datetime.rs +++ b/src/validators/datetime.rs @@ -140,7 +140,6 @@ impl Validator for DateTimeValidator { } /// In lax mode, if the input is not a datetime, we try parsing the input as a date and add the "00:00:00" time. -/// /// Ok(None) means that this is not relevant to datetimes (the input was not a date nor a string) fn datetime_from_date<'data>(input: &'data impl Input<'data>) -> Result>, ValError> { let either_date = match input.validate_date(false) { @@ -171,7 +170,7 @@ fn datetime_from_date<'data>(input: &'data impl Input<'data>) -> Result