VirusTotal / vt-py

The official Python 3 client library for VirusTotal
https://virustotal.github.io/vt-py/
Apache License 2.0
531 stars 121 forks source link

fix: Create timezone-aware datetime for Objects #194

Open frereit opened 1 month ago

frereit commented 1 month ago

Use .fromtimestamp instead of .utcfromtimestamp to create a timezone-aware datetime object.

Previously, the object was naive. .utcfromtimestamp is deprecated because naive datetime objects lead to ambiguity and problems.

By using a datetime-aware object, is is clearly signaled to the caller that the datetime is a UTC-timestamp, and it may easily be converted using .astimezone

google-cla[bot] commented 1 month ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.