Skip to content
Snippets Groups Projects
Commit 50dca46b authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] Made timezone detect more robust and added a config option to override it.

Stay backwards-compatible by using time.tzname[0] as we did before if no config option is provided, but only if it is a valid timezone (in the pytz sense).
If no config option is set and time.tzname does't work, fallback, in this order, to:
- environment variable 'TZ'
- /etc/timezone on Unix platforms
- Windows registry on win32 systems
- if nothing works, default to UTC (because we MUST provide a valid timezone to clients)

lp bug: https://launchpad.net/bugs/389544 fixed

bzr revid: odo@openerp.com-20100105152312-fgayeaks12ed3no8
parent c01d37e8
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment