Converts ISO to datetime object in UTC
(date_str)
| 70 | return str(obj).strip("<>").split(" ")[0] |
| 71 | |
| 72 | def get_datetime_utc(date_str): |
| 73 | """Converts ISO to datetime object in UTC""" |
| 74 | date = isoparse(date_str) |
| 75 | margin = date.utcoffset() |
| 76 | return date.replace(tzinfo=timezone.utc) - margin |
| 77 | |
| 78 | def ppnb(nb: float|int) -> float: |
| 79 | """ |