Skip to content
Snippets Groups Projects
Commit 997320e8 authored by Mohammed Shekha's avatar Mohammed Shekha Committed by Thibault Delavallée
Browse files

[IMP] website: when no timezone in context, guess it from the

geoip data. This is used to find a timezone for public user.
parent 36925ad5
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,8 @@ class ir_http(orm.AbstractModel):
if first_pass:
request.lang = request.website.default_lang_code
request.context['lang'] = request.lang
if not request.context.get('tz'):
request.context['tz'] = request.session['geoip'].get('time_zone')
if not func:
path = request.httprequest.path.split('/')
langs = [lg[0] for lg in request.website.get_languages()]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment