summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-12-12 13:35:57 +0100
committerXavier Morel <xmo@openerp.com>2011-12-12 13:35:57 +0100
commit53f60f0deaf44c8f4a1974bebe9b3e6cb03c5403 (patch)
tree47a536005c4c87e63025d89626b7d17555ab8ec2 /addons/web/static/src
parent802ca760a01e5ad3cf1f895d5f504db0d2285777 (diff)
[FIX] parsing of UTC datetime data from server
lp bug: https://launchpad.net/bugs/902439 fixed bzr revid: xmo@openerp.com-20111212123557-4bfqmgjnpkv0nsha
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/dates.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/dates.js b/addons/web/static/src/js/dates.js
index 7861dd21b79..907eaa39fcd 100644
--- a/addons/web/static/src/js/dates.js
+++ b/addons/web/static/src/js/dates.js
@@ -20,7 +20,7 @@ openerp.web.str_to_datetime = function(str) {
if ( !res ) {
throw new Error("'" + str + "' is not a valid datetime");
}
- var obj = Date.parse(res[1] + " GMT");
+ 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");
}
@@ -43,7 +43,7 @@ openerp.web.str_to_date = function(str) {
if ( !res ) {
throw new Error("'" + str + "' is not a valid date");
}
- var obj = Date.parse(str);
+ var obj = Date.parseExact(str + ' UTC', 'yyyy-MM-dd zzz');
if (! obj) {
throw new Error("'" + str + "' is not a valid date");
}
@@ -66,7 +66,7 @@ openerp.web.str_to_time = function(str) {
if ( !res ) {
throw new Error("'" + str + "' is not a valid time");
}
- var obj = Date.parse(res[1]);
+ var obj = Date.parseExact(res[1] + ' UTC', 'HH:mm:ss zzz');
if (! obj) {
throw new Error("'" + str + "' is not a valid time");
}