I've went through a few useful discussions on the topic, but still don't understand the following:
Say, I have a string "20080730 06:23:54 PDT" which I want to convert to a timezone aware datetime object. I understand, that dateutil.parser.parse() doesn't generally parse timezones like "PDT", but looks like it does parse "UTC" and "EDT" correctly. Are these exceptions? Is "EDT" an exception b/c it's my local timezone?
import pytz
from dateutil.parser import parse
sdt="20080730 06:23:54 UTC"
dt_obj = parse(sdt)
dt_obj
datetime.datetime(2008, 7, 30, 6, 23, 54, tzinfo=tzutc())
sdt="20080730 06:23:54 EDT"
dt_obj = parse(sdt)
dt_obj
datetime.datetime(2008, 7, 30, 6, 23, 54, tzinfo=tzlocal())
sdt="20080730 06:23:54 PDT"
dt_obj = parse(sdt)
dt_obj
datetime.datetime(2008, 7, 30, 6, 23, 54)