Univention Bugzilla – Bug 36278
admember.py timesync fails when using wrong locale
Last modified: 2015-08-03 15:12:56 CEST
A time string returned by the AD is parsed in def timesync(). This parsing fails sometimes although the string is correct.
TIME_FORMAT = "%a %b %d %H:%M:%S %Z %Y"
datetime.strptime('Wed Oct 22 17:52:26 CEST 2014', TIME_FORMAT)
This works when you use a German UCS and just use python.
But if you do the following prior to the strptime:
Seen in system-setup, where setting the locale is done (mainly for apt messages).
I am not sure whether the time string returned from AD is strictly defined (w.r.t. the locale). If so, one should probably set the locale to 'C' before the check (and reset afterwards). If not, one should test against 'C' and getdefaultlocale() - as this locale is probably used on the AD, too.
There is a
env["LC_ALL"] = "C"
used in the rdate subprocess.
Set LC_TIME to (None, None) in
Ok, works. Looks like Debian rdate doesn't do setlocale.
UCS 4.0-0 has been released:
If this error occurs again, please use "Clone This Bug".