Tag: Style color file problem CTI C
This problem has been bothering me, background settings about the time zone also referred to some articles (such as changing the configuration file), display time is always 8 hours, and later looked at the above article before the fix, although that is to solve OE7.0, but the principle of the same:
Server\openerp\addons\web\static\src\js\dates.js
23 lines, the following red font is the original:
Openerp.web.str_to_datetime = function (str) {
if (!STR) {
return str;
}
var regex =/^ (\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d) (?: \. \d+)? $/;
var res = regex.exec (str);
if (!res) {
throw new Error ("'" + str + "is not a valid datetime");
}
var obj = date.parseexact (res[1] + "UTC", ' yyyy-mm-dd HH:mm:ss zzz ');
if (! obj) {
throw new Error ("'" + str + "is not a valid datetime");
}
return obj;
};
Switch
var obj = date.parseexact (res[1], ' yyyy-mm-dd HH:mm:ss ')
Restart OE service OK.