[IMP]:add logger warning to notify the user for incorrect timezone value in config
bzr revid: nch@tinyerp.com-20110506103053-egt8eh85knkd3mg0
This commit is contained in:
@@ -1285,6 +1285,8 @@ def get_server_timezone():
|
||||
# timezone detection is safe in multithread, so lazy init is ok here
|
||||
if config['timezone'] and \
|
||||
not isinstance(config['timezone'], basestring):
|
||||
loglevels.Logger().notifyChannel("detect_server_timezone", loglevels.LOG_WARNING,
|
||||
"Invalid timezone value in configuration or environment: %r, using UTC instead. Please fix this in your configuration" %(config['timezone']))
|
||||
return 'UTC'
|
||||
if (not config['timezone']):
|
||||
config['timezone'] = detect_server_timezone()
|
||||
|
||||
Reference in New Issue
Block a user