Skip to content
Closed
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
4 changes: 2 additions & 2 deletions src/joseki/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def rescale(
raise ValueError("Cannot rescale") from e

# update history attribute
now = datetime.datetime.utcnow().replace(microsecond=0).isoformat()
now = datetime.datetime.now(datetime.UTC).replace(microsecond=0).isoformat()
for m in factors.keys():
ds.attrs["history"] += (
f"\n{now} - rescaled {m}'s mole fraction using a scaling "
Expand Down Expand Up @@ -471,7 +471,7 @@ def drop_molecules(self, molecules: t.List[str]) -> xr.Dataset:
ds = self._obj

# update history attribute
now = datetime.datetime.utcnow().replace(microsecond=0).isoformat()
now = datetime.datetime.now(datetime.UTC).replace(microsecond=0).isoformat()

ds.attrs["history"] += (
f"\n{now} - dropped mole fraction data for molecules "
Expand Down
2 changes: 1 addition & 1 deletion src/joseki/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def merge(
)

# update attributes
now = datetime.datetime.utcnow().replace(microsecond=0).isoformat()
now = datetime.datetime.now(datetime.UTC).replace(microsecond=0).isoformat()

institutions = set([ds.attrs["institution"] for ds in datasets])
sources = set([ds.attrs["source"] for ds in datasets])
Expand Down
2 changes: 1 addition & 1 deletion src/joseki/profiles/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def utcnow() -> str:
Returns:
ISO 8601 formatted UTC timestamp.
"""
return datetime.datetime.utcnow().replace(microsecond=0).isoformat()
return datetime.datetime.now(datetime.UTC).replace(microsecond=0).isoformat()


def number_density(p: pint.Quantity, t: pint.Quantity) -> pint.Quantity:
Expand Down
Loading