I need to discover the timezone offset in seconds from UTC. Here's what I am trying now:
timeZoneSecondsOffset = calendar.timegm(time.gmtime()) - calendar.timegm(time.localtime())
This works - kind of. It gives a value that is off by one hour. How can I get a more accurate result?
This works for me:
Result when run on my PC in the US central time zone: