BCDA-APS / gemviz

Data visualization for tiled
https://bcda-aps.github.io/gemviz/
Other
4 stars 0 forks source link

Filter time #16

Closed rodolakis closed 1 year ago

rodolakis commented 1 year ago

You can use Pete's function from the utils.py file. Here is an example:

import datetime
def iso2time(isotime):
    return datetime.datetime.timestamp(datetime.datetime.fromisoformat(isotime))

start_time_ISO8601 = "2023-03-17 00:30"
end_time_ISO8601 = "2023-05-19 15:15"

start_timestamp= iso2time(start_time)
end_timestamp=iso2time(end_time)

print(f"{start_time_ISO8601 = }")
print(f"{start_timestamp = }")

print(f"{end_time_ISO8601 = }")
print(f"{end_timestamp = }")