Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/pendulum/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ def __getnewargs__(self) -> tuple[Self]:

def _getstate(
self, protocol: SupportsIndex = 3
) -> tuple[int, int, int, int, int, int, int, datetime.tzinfo | None]:
) -> tuple[int, int, int, int, int, int, int, datetime.tzinfo | None, int]:
return (
self.year,
self.month,
Expand All @@ -1348,6 +1348,7 @@ def _getstate(
self.second,
self.microsecond,
self.tzinfo,
self.fold,
)

def __reduce__(
Expand All @@ -1364,7 +1365,7 @@ def __reduce_ex__(
type[Self],
tuple[int, int, int, int, int, int, int, datetime.tzinfo | None],
]:
return self.__class__, self._getstate(protocol)
return self.create, self._getstate(protocol)

def __deepcopy__(self, _: dict[int, Self]) -> Self:
return self.__class__(
Expand Down
Loading