lair.clock.convert_timezones#
- lair.clock.convert_timezones(x, totz, fromtz=None, localize=False, driver=None)[source]#
Convert the times from one timezone to another.
- Parameters:
x (list[dt.datetime] | pd.DataFrame | pd.Series) – The times to convert.
totz (str) – The timezone to convert the times to.
fromtz (str, optional) – The timezone of the input times, by default None
localize (bool, optional) – If True, the times will be localized to the totz timezone, by default False
- Returns:
list[dt.datetime] | pd.DataFrame | pd.Series – The converted times.