datetime_astimezone

PlasmaCalcs.tools.history.datetime_astimezone(datetime_, tz='local')

convert a datetime.datetime to the requested timezone.

Similar to datetime_.astimezone(tz), but also supports tz=’local’ and ‘utc’.
datetime_: datetime.datetime object
datetime to convert.
tz: ‘local’, ‘utc’, or datetime.tzinfo object
timezone to convert result to.
None –> do not convert.
‘local’ –> machine’s local timezone.
‘utc’ –> standard/universal time (UTC) (“+00:00” if converted to str)