0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

datetime.datetime.utcnow()の代わりにdatetime.datetime.now(datetime.UTC)を使おう

Posted at

Python系の写経でdatetime.datetime.utcnow()を使うと非推奨と出てきたので、代わりにどうすればいいのか調べたらdatetime.datetime.now(datetime.UTC)を使えとのことだった。ただ、それだけ。

import datetime 

now = datetime.datetime.utcnow(datetime.UTC)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?