I have datetime values in local time zone, and I need to convert them into UTC. How can I do this conversion for historical records, considering daylight saving time in the past?
Local UTC
2018/07/20 09:00 ???
2018/12/31 11:00 ???
2019/01/17 13:00 ???
2020/08/15 18:00 ???
This is what I have so far:
import pytz
without_timezone = datetime(2018, 7, 20, 9, 0, 0, 0)
timezone = pytz.timezone("Europe/Vienna")
with_timezone = timezone.localize(without_timezone)
with_timezone
So, I assigned Europe/Vienna to all records (I assume that this considers daylight saving time, right?)
Now I need to convert it into UTC...