sqlalchemy-file icon indicating copy to clipboard operation
sqlalchemy-file copied to clipboard

Fix deprecationwarning for datetime.utcnow

Open Matthieu-LAURENT39 opened this issue 1 year ago • 1 comments

This replaces the call to datetime.utcnow() to datetime.now(timezone.utc). datetime.utcnow() is deprecated since python 3.12, and as such shows a warning every time save_to_storage() is called.

We use timezone.utc instead of the more recent datetime.utc, since only the former is available in python 3.7

Matthieu-LAURENT39 avatar Feb 22 '24 10:02 Matthieu-LAURENT39

should fix : https://github.com/jowilf/sqlalchemy-file/issues/150

yobuntu avatar May 03 '24 09:05 yobuntu