Skip to content

Commit

Permalink
try fixing PyTzInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
PrettyWood committed Aug 24, 2022
1 parent b7ae078 commit 9988f63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input/datetime.rs
Expand Up @@ -220,10 +220,10 @@ impl<'a> EitherDateTime<'a> {
pub fn try_into_py(self, py: Python<'a>) -> PyResult<PyObject> {
let dt = match self {
Self::Raw(datetime) => {
let tz: Option<PyObject> = match datetime.offset {
let tz: Option<PyTzInfo> = 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,
};
Expand Down

0 comments on commit 9988f63

Please sign in to comment.