8000 chore: update usage of datetime.now by acepace · Pull Request #4949 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content

chore: update usage of datetime.now #4949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025
Merged
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
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 <acepace@gmail.com>
  • Loading branch information
Ace Pace committed Dec 21, 2024
commit 3cec78924e9daa99cb1c46bbacc4dbd2c283d05c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def numpy_unicode_array(request):
params=[
datetime.datetime(2003, 7, 12, 8, 34, 22),
datetime.datetime.now(),
np.datetime64(datetime.datetime.utcnow()),
np.datetime64(datetime.datetime.now(datetime.timezone.utc)),
pd.Timestamp(datetime.datetime.now()),
eastern.localize(datetime.datetime(2003, 7, 12, 8, 34, 22)),
eastern.localize(datetime.datetime.now()),
Expand Down
0