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
2 changes: 1 addition & 1 deletion papermill/engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(self, nb, output_path=None, log_output=False, progress_bar=True, au

def now(self):
"""Helper to return current UTC time"""
return datetime.datetime.utcnow()
return datetime.datetime.now(datetime.timezone.utc)

def set_timer(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions papermill/parameterize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timezone
from uuid import uuid4

import nbformat
Expand All @@ -23,7 +23,7 @@ def add_builtin_parameters(parameters):
"pm": {
"run_uuid": str(uuid4()),
"current_datetime_local": datetime.now(),
"current_datetime_utc": datetime.utcnow(),
"current_datetime_utc": datetime.now(timezone.utc),
}
}

Expand Down