Skip to content

utcfromtimestamp deprecated #26

@AlexKurek

Description

@AlexKurek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions