Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions changelog/+bump-whenever.housekeeping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump `whenever` dependency to `>=0.10.0,<0.11.0`
4 changes: 2 additions & 2 deletions infrahub_sdk/timestamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, value: str | ZonedDateTime | Timestamp | None = None) -> None
elif isinstance(value, str):
self._obj = self._parse_string(value)
else:
self._obj = ZonedDateTime.now("UTC").round(unit="microsecond")
self._obj = ZonedDateTime.now("UTC").round("microsecond")

@property
def obj(self) -> ZonedDateTime:
Expand Down Expand Up @@ -114,7 +114,7 @@ def to_timestamp(self) -> int:
return self._obj.timestamp()

def to_datetime(self) -> datetime:
return self._obj.py_datetime()
return self._obj.to_stdlib()

def get_obj(self) -> ZonedDateTime:
return self._obj
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"httpx>=0.20",
"ujson>=5",
"dulwich>=0.24.7",
"whenever>=0.9.3,<0.10.0",
"whenever>=0.10.0,<0.11.0",
"netutils>=1.0.0",
"tomli>=1.1.0; python_version<'3.11'",
]
Expand Down