vt-py icon indicating copy to clipboard operation
vt-py copied to clipboard

fix: Create timezone-aware datetime for Objects

Open frereit opened this issue 1 year ago • 1 comments

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

frereit avatar Jul 20 '24 21:07 frereit

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.

google-cla[bot] avatar Jul 20 '24 21:07 google-cla[bot]