You can use the dateutil module for this. To get the local timezone right now:
>>> import dateutil.tz
>>> import datetime
>>> localtz = dateutil.tz.tzlocal()
>>> localtz.tzname(datetime.datetime.now(localtz))
'EDT'
I am currently in Eastern Daylight Time. You can see it change back to EST in the future, after daylight savings switches back:
>>> localtz.tzname(datetime.datetime.now(localtz) +
datetime.timedelta(weeks=20))
'EST'
If you want the offset from UTC, you can use the utcoffset function. It returns a timedelta:
>>> localtz.utcoffset(datetime.datetime.now(localtz))
datetime.timedelta(-1, 72000)
In this case, since I'm UTC-4, it returns -1 days + 20 hours. You can convert it to hours if that's what you need:
>>> localoffset = localtz.utcoffset(datetime.datetime.now(localtz))
>>> localoffset.total_seconds() / 3600
-4.0