Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utcfromtimestamp deprecated #26

Open
AlexKurek opened this issue Mar 30, 2024 · 1 comment
Open

utcfromtimestamp deprecated #26

AlexKurek opened this issue Mar 30, 2024 · 1 comment

Comments

@AlexKurek
Copy link

AlexKurek commented Mar 30, 2024

https://github.com/MITHaystack/srt-py/blob/master/srt/dashboard/layouts/graphs.py#L266 is deprecated since Python 3.12.

It can be repleced by fromtimestamp:

from datetime import datetime, timezone

ts = 1571595618.0
x = datetime.utcfromtimestamp(ts)
print(x)

y = datetime.fromtimestamp(ts, tz=timezone.utc)
print(y)

2019-10-20 18:20:18
2019-10-20 18:20:18+00:00

@AlexKurek
Copy link
Author

Fixed: AlexKurek@45a309e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant