default today date is one day before in date widgets for timezones west of UTC (neg. offset)

Bug #922065 reported by Raphaël Valyi - http://www.akretion.com
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Web Team

Bug Description

Hello, it's pretty easy to reproduce,

do to your runbot for last revesion like:
http://trunk_526.runbot.openerp.com:9524/ admin/admin

create a new purchase order and you'll see that the day is 25 instead of 26.

With the GTK there isn't such a bug. This is a bad one IMO.

Hope this helps.

Tags: timezone
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

I don't see this behavior. What is your browser or OS timezone? Can you try to switch to Central European time or something else and see if you still reproduce this issue?

Changed in openerp-web:
status: New → Incomplete
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Actually, I managed to reproduce it by switching to Rio (BRST) as my Ubuntu timezone, and reopening the web client (on FF).

The trace of the JSON default_get call shows that the server is returning the proper date:
{"jsonrpc": "2.0", "id": "r222", "result": {"name": "PO00022", "partner_address_id": false, "company_id": 1, "warehouse_id": 1, "invoice_method": "order", "state": "draft", "pricelist_id": false, "date_order": "2012-01-26", "shipped": 0, "invoiced": 0}}

So I imagine this could be because the conversion is done on a pseudo-timestamp with 00:00:00 as the time, and "2012-01-26 00:00:00 UTC" is indeed "2012-01-25 22:00:00 BRST".

Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Medium
status: Incomplete → Confirmed
summary: - default today date is one day before in date widgets
+ default today date is one day before in date widgets for timezones west
+ of UTC (neg. offset)
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 922065] Re: default today date is one day before in date widgets

Hello Olivier,

yeah, I just did the same kind of manipulation and indeed, setting my
client timezone to Europe/Paris it suddenly started to work properly. Now,
setting it back to America/Sao Paulo makes to bug appear.
Also note that the GTK client doesn't have such a bug.

On Thu, Jan 26, 2012 at 12:59 PM, Olivier Dony (OpenERP) <
<email address hidden>> wrote:

> Actually, I managed to reproduce it by switching to Rio (BRST) as my
> Ubuntu timezone, and reopening the web client (on FF).
>
> The trace of the JSON default_get call shows that the server is returning
> the proper date:
> {"jsonrpc": "2.0", "id": "r222", "result": {"name": "PO00022",
> "partner_address_id": false, "company_id": 1, "warehouse_id": 1,
> "invoice_method": "order", "state": "draft", "pricelist_id": false,
> "date_order": "2012-01-26", "shipped": 0, "invoiced": 0}}
>
> So I imagine this could be because the conversion is done on a pseudo-
> timestamp with 00:00:00 as the time, and "2012-01-26 00:00:00 UTC" is
> indeed "2012-01-25 22:00:00 BRST".
>
> ** Changed in: openerp-web
> Importance: Undecided => Medium
>
> ** Changed in: openerp-web
> Status: Incomplete => Confirmed
>
> ** Changed in: openerp-web
> Assignee: (unassigned) => OpenERP R&D Web Team (openerp-dev-web)
>
> ** Summary changed:
>
> - default today date is one day before in date widgets
> + default today date is one day before in date widgets for timezones west
> of UTC (neg. offset)
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Web.
> https://bugs.launchpad.net/bugs/922065
>
> Title:
> default today date is one day before in date widgets for timezones
> west of UTC (neg. offset)
>
> Status in OpenERP Web:
> Confirmed
>
> Bug description:
> Hello, it's pretty easy to reproduce,
>
> do to your runbot for last revesion like:
> http://trunk_526.runbot.openerp.com:9524/ admin/admin
>
> create a new purchase order and you'll see that the day is 25 instead
> of 26.
>
> With the GTK there isn't such a bug. This is a bad one IMO.
>
> Hope this helps.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openerp-web/+bug/922065/+subscriptions
>

Changed in openerp-web:
status: Confirmed → Fix Released
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

For the record, this was fixed at revision 2067 revid: <email address hidden>, so the web client should now behave exactly like the GTK client.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 922065] Re: default today date is one day before in date widgets for timezones west of UTC (neg. offset)

Hello I confirmed it's fixed indeed. Thanks a lot!

On Fri, Jan 27, 2012 at 11:52 AM, Olivier Dony (OpenERP) <
<email address hidden>> wrote:

> For the record, this was fixed at revision 2067 revid:
> <email address hidden>, so the web
> client should now behave exactly like the GTK client.
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Web.
> https://bugs.launchpad.net/bugs/922065
>
> Title:
> default today date is one day before in date widgets for timezones
> west of UTC (neg. offset)
>
> Status in OpenERP Web:
> Fix Released
>
> Bug description:
> Hello, it's pretty easy to reproduce,
>
> do to your runbot for last revesion like:
> http://trunk_526.runbot.openerp.com:9524/ admin/admin
>
> create a new purchase order and you'll see that the day is 25 instead
> of 26.
>
> With the GTK there isn't such a bug. This is a bad one IMO.
>
> Hope this helps.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openerp-web/+bug/922065/+subscriptions
>

tags: added: timezone
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.