Skip to content

Commit 3cec789

Browse files
author
Ace Pace
committed
chore: update usage of datetime.now
datetime.datetime.utcnow() is deprecated, replace with tz aware function Note this adds a user warning from numpy but this seems preferable Signed-off-by: Ace Pace <[email protected]>
1 parent 231edaa commit 3cec789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/python/plotly/plotly/tests/test_io/test_to_from_plotly_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def numpy_unicode_array(request):
109109
params=[
110110
datetime.datetime(2003, 7, 12, 8, 34, 22),
111111
datetime.datetime.now(),
112-
np.datetime64(datetime.datetime.utcnow()),
112+
np.datetime64(datetime.datetime.now(datetime.timezone.utc)),
113113
pd.Timestamp(datetime.datetime.now()),
114114
eastern.localize(datetime.datetime(2003, 7, 12, 8, 34, 22)),
115115
eastern.localize(datetime.datetime.now()),

0 commit comments

Comments
 (0)