I want to convert the timezones of a set list of ISO 8601 values into UTC. I won't know what the timezones of the given value in the list are (nor if they would be in a valid format, but in this case I would want to discard any values with an invalid ISO format), so by the end I want all of my values to be in UTC (ISO format).
Example ISO formatted value in my list: 2019-11-17T02:56:51+0700
I've been looking at a lot of similar things but it seems like most people want to convert the current time of the computer into some x timezone, so it's been quite confusing to me if what I want to do is possible or how exactly to do it. Would converting it into a Python datetime object be mandatory for timezone conversions, and if so, how should I go about it (e.g. pytz
vs. timezone
from datetime import, I'm fuzzy on the differences so any advice would be great)