For those who come across the same issue, here is how I ended up solving the problem.
I downloaded a tab delimitated list from Geonames.org that contained a list of cities, which also contained the Olson Timezone ID for each city as well. There are a few different lists you can download from Geoname's export dump link (seen below), but I went with the cities5000.zip list so as to have a fairly comprehensive list of cities without being too bloated.
You can find the download links and information regarding the lists at the link below:
http://download.geonames.org/export/dump/readme.txt
Because the list contained a lot of unnecessary information (such as lat and lng coordinates), and because I needed the data to be in a .plist format so as to be easily used in the iOS application, I wrote a simple Python script that would extract the city names and timezones from the list, sort them alphabetically based on the city names, and then convert to the .plist format.
For those interested, the python script is as follows:
import json
import httplib
import os
cities = ()
rows = []
# Open up the tab delim list from Geonames.org
with open("cities15000.txt") as file:
lines = file.readlines()
# Reading each line in the list
for line in lines:
comps = line.split('\t')
city = comps[1].strip()
timezone = comps[17].strip()
# Make sure there are no duplicates
if not city in cities:
cities = cities + (city,)
row = {'city':city,'timezone':timezone}
rows = rows + [row,]
# Sort the rows based on the city name
def cmp(a,b):
if a['city'] > b['city']:
return 1
elif a['city'] == b['city']:
return 0
else:
return -1
rows.sort(cmp)
# Convert the array to json and then to plist
jsonString = json.dumps(rows)
with open("cities.json", "w") as jsonFile:
jsonFile.write(jsonString)
os.system('plutil -convert xml1 cities.json -o cities.plist')