如何获取已知时区字符串的时区偏移量?

How to get the timezone offset for the known timezone string?

我正在使用 pygeoip 包获取 IP 的时区,

>>> import pygeoip
>>> gi = pygeoip.GeoIP('GeoIPCity.dat')
>>> gi.time_zone_by_addr('64.233.161.99')
'America/Los_Angeles'

有没有可以提供时区的软件包
PST UTC -8:00 America/Los_Angeles
或者有什么类似的内容?

我认为 pytz 库是您需要的:http://pytz.sourceforge.net/