[FIX] py_date should return a local date, not a UTC date
authorXavier Morel <xmo@openerp.com>
Wed, 28 Nov 2012 10:47:16 +0000 (11:47 +0100)
committerXavier Morel <xmo@openerp.com>
Wed, 28 Nov 2012 10:47:16 +0000 (11:47 +0100)
bzr revid: xmo@openerp.com-20121128104716-w7zqiljfazj597pg

addons/web/static/src/js/corelib.js

index 6d7e3c3..0a6f4ed 100644 (file)
@@ -990,7 +990,7 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
         };
         date.today = new py.def(function () {
             var d = new Date();
-            return new date(d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate());
+            return new date(d.getFullYear(), d.getMonth() + 1, d.getDate());
         });
         datetime.time = new py.type(function time() {
             throw new Error('datetime.time not implemented');