botocore
botocore copied to clipboard
Refactored usages of deprecated method utcnow()
Refactored usages of utcnow() method for method now(datetime.UTC). The first method is being deprecated and displaying deprecation warnings
+1 🙏
I've already opened a PR to address this: #3239.
The method used in this PR has been previously attempted, but had to be discarded because it made the datetime objects timezone-aware.
In addition, the datetime.UTC alias used in this PR is only available in Python 3.11 and higher, and would cause AttributeErrors in lower Python versions.
Resolving in favor of https://github.com/boto/botocore/pull/3239. Thanks for the contribution though!