I am using the App engine and I am trying to get the time zone from the request. However, when on the local host it always seems that ZZ is a country code, which is not a country in the pytz library.
This code:
country = self.request.headers['X-Appengine-Country'] logging.info(country) tz = pytz.country_timezones(country)
causes this error:
return self.data[key.upper()] KeyError: 'ZZ'
Thank you very much for your help
I suggest you use the correct case for the request header names. E.g.X-AppEngine-Country
X-AppEngine-Country
, Location , .. . . , , Google, Google .
.
'ZZ' " "
, 1070 + 30a + b, a b - , A = 1, B = 2 .. , AA = 1101, AB = 1102, BA = 1131 ZZ = 1876.