You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
datetime.datetime.utcnow() has been deprecated in Python 3.12 and datetime.datetime.now(datetime.UTC) should be used instead. That datetime.UTC is new in Python 3.11, so we need to use either version or feature detection to avoid using it with earlier Python versions.
The text was updated successfully, but these errors were encountered:
We cannot simply use datetime.datetime.now(datetime.UTC) because that returns a timezone aware datetime object that cannot be used together with non-timezone aware (i.e. naive) objects that we otherwise use with DateTime. Using datetime.datetime.now(datetime.UTC).replace(tzinfo=None) avoids that problem by removing timezone information and making the object naive.
DateTime also supporting aware objects and having better timezone support in general would be nice, but that requires quite a lot of changes. Can be considered later, but absolutely not in RF 7.0.
datetime.datetime.utcnow() has been deprecated in Python 3.12 and
datetime.datetime.now(datetime.UTC)
should be used instead. Thatdatetime.UTC
is new in Python 3.11, so we need to use either version or feature detection to avoid using it with earlier Python versions.The text was updated successfully, but these errors were encountered: