Check out pytz for a Python API to the Olson timezone database.
As mentioned in the comments, the "PST" part is probably not reliable.
Using pytz you can bruteforce the problem, in a way. If we assume you want to resolve the numerical part of the input, and ignore whatever string precedes it, it could look something like this:
import pytz
import re
from datetime import datetime
def find_timezone_name(input):
match = re.match(r'.*([+-]\d+) (\d+)', input)
if match:
offset = int(match.group(1))+int(match.group(2))/10.0
else:
raise ValueError('Unexpected input format')
refdate = datetime.now()
for tzname in pytz.common_timezones:
tzinfo = pytz.timezone(tzname)
tzoffset = tzinfo.utcoffset(refdate)
if offset == tzoffset.total_seconds()/3600:
return tzname
return "Unknown"
print(find_timezone_name('PST -8 0'))
If you want to restrict the timezones to a specific list you can replace pytz.common_timezones
with something else and/or apply some other type of logic if you have additional input data that would help your selection process.
Of course, you can adapt the regex to accommodate additional input variants.
Finally make sure you take in consideration the points mentioned by Matt Johnson in his answer to this same question.