From 9988f6381ebe2fc8b2ad27c5861f506075a4f864 Mon Sep 17 00:00:00 2001 From: Eric Jolibois Date: Wed, 24 Aug 2022 17:25:18 +0200 Subject: [PATCH] try fixing PyTzInfo --- src/input/datetime.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/datetime.rs b/src/input/datetime.rs index c8e639372..226e3b9a2 100644 --- a/src/input/datetime.rs +++ b/src/input/datetime.rs @@ -220,10 +220,10 @@ impl<'a> EitherDateTime<'a> { pub fn try_into_py(self, py: Python<'a>) -> PyResult { let dt = match self { Self::Raw(datetime) => { - let tz: Option = match datetime.offset { + let tz: Option = match datetime.offset { Some(offset) => { let tz_info = TzInfo::new(offset); - Some(Py::new(py, tz_info)?.to_object(py)) + Some(tz_info) } None => None, };