[FIX] res_lang: sanitize time_format for python's strftime
authorOlivier Dony <odo@openerp.com>
Mon, 10 Jan 2011 15:19:12 +0000 (16:19 +0100)
committerOlivier Dony <odo@openerp.com>
Mon, 10 Jan 2011 15:19:12 +0000 (16:19 +0100)
commit438232f6bef8e0b2d1a089dddf0c91685e1da001
treedbf62207a5bdc57c6615a0466764fd7ca6ffdedc
parent5813e0ee206e3f397576594557bce9687bae4962
[FIX] res_lang: sanitize time_format for python's strftime

POSIX's strftime has a number of 'compound' formats for quick-formatting of time spans (e.g. %T for %H:%M:%S) which Python's own strftime does not support => error when trying to use them

manually expand those compound formats to their atoms

refs:
http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
http://docs.python.org/library/time.html#time.strftime

lp bug: https://launchpad.net/bugs/698134 fixed
lp bug: https://launchpad.net/bugs/697833 fixed

bzr revid: odo@openerp.com-20110110151912-ysu06271z40hxxho
bin/addons/base/res/res_lang.py