Skip to content

Commit

Permalink
don't use utcnow() in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
atimin committed Mar 10, 2023
1 parent a40364a commit 91c28d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Empty password and error message when no ReductStore available, [PR-30](https://github.com/panda-official/DriftPythonClient/pull/30)

### 0.4.0 - 2023-02-13
## 0.4.0 - 2023-02-13

### Added:

Expand Down
4 changes: 2 additions & 2 deletions examples/get_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def main():
drift_client = DriftClient("drift-test-rig.local", os.getenv("DRIFT_PASSWORD"))
metrics = drift_client.get_metrics(
"energy-distr-1",
start=datetime.datetime.utcnow() - datetime.timedelta(minutes=15),
stop=datetime.datetime.utcnow(),
start=datetime.datetime.now() - datetime.timedelta(minutes=15),
stop=datetime.datetime.now(),
names=["d1", "d2"],
)

Expand Down
5 changes: 3 additions & 2 deletions examples/get_package_names.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from datetime import timezone

from drift_client import DriftClient

Expand All @@ -11,10 +12,10 @@

def main():
# Init
drift_client = DriftClient("drift-dev2.local", os.getenv("DRIFT_PASSWORD"))
drift_client = DriftClient("tesa-1d2.local", os.getenv("DRIFT_PASSWORD"))
# Download list of history
packages = drift_client.get_package_names(
"acc-5",
"camera",
start=datetime.datetime.now() - datetime.timedelta(minutes=1),
stop=datetime.datetime.now(),
)
Expand Down

0 comments on commit 91c28d5

Please sign in to comment.