[6.1] impossible to save October 21st 2012 in date widgets when using Brasil/Rio TZ

Bug #1068105 reported by Raphaël Valyi - http://www.akretion.com
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Won't Fix
Undecided
OpenERP Publisher's Warranty Team

Bug Description

Dear OpenERP,

That would be a good joke if this wasn't that soon, what the hell happens October 21st ?
When you set your browser timezone to Brazil (Rio at least), then you can not enter the date 10/21/2012, it's automatically rolled back as 10/20/2012 once it's saved.
Actually somebody told me that the date may be correct inside the database but "only" displayed incorrectly in the widget.

You can see the whole scenario of the issue on this little enhanced video:
http://www.youtube.com/watch?v=adx3GLQy1WY&feature=plcp

Could be nice if you could fix it before hitting the date as I cannot imagine my customer not managing to filter any order properly the 21st.

I'm also reporting that through the OPW support channel.

Regard.

Tags: maintenance
Revision history for this message
Anil Kesariya(SerpentCS) (a-kesariya-serpentcs) wrote :

Raphaël,

A very nice video really, presentation of error too.

I made my team checking this interesting bug, but failed to share a smile here by not reproducing it.

I have tried all 4 timezones provided in OpenERP Timezone selection.

I prefer to make sure that there is no onchange creating a mess. Still eager to generate this and fix if encountered again, war is on!

Just my 2 cents,

Thanks,
Anil,
Serpent Consulting Services!

Revision history for this message
Niels Huylebroeck (red15) wrote :
Revision history for this message
Peter Langenberg (peter-langenberg) wrote :

I think Niels is right ... it's not the end of the world, but we think that it's the Daylight Saving Time ...

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

So maybe part of the issue is that 2012-10-21 00:00:00 does not exist in that timezone, due to the DST switch (probably one of the reasons why DST switches occur between 2 and 3 in Western Europe rather than at midnight)

summary: - [6.1] impossible to save October 21st 2012 in any date widget!
+ [6.1] impossible to save October 21st 2012 in date widgets when using
+ Brasil/Rio TZ
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello,

yes, it's certainly the Daylight Saving Time rather than the end of the world indeed. Now, it should still be possible to affect the October 21st date, no?
Again, to reproduce the issue, you can use the runbot of 6.1 and change your timezone (in your browser settings, not in OpenERP) to set Brazilia timezone. I just did it again in the database "6_1_22445_all", at Akretion we could reproduce the bug on 4 different installations, including in France by just changing the timezone of the browser.

Regards.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 1068105] Re: [6.1] impossible to save October 21st 2012 in any date widget!

Yes, that's what I think too.
Naive question: wouldn't it be better to always offset the date (by a few
hours) in datetime widget to avoid such threshold effects of midnight
daylight savings?

On Thu, Oct 18, 2012 at 11:06 AM, Olivier Dony (OpenERP) <
<email address hidden>> wrote:

> So maybe part of the issue is that 2012-10-21 00:00:00 does not exist in
> that timezone, due to the DST switch (probably one of the reasons why
> DST switches occur between 2 and 3 in Western Europe rather than at
> midnight)
>
> ** Summary changed:
>
> - [6.1] impossible to save October 21st 2012 in any date widget!
> + [6.1] impossible to save October 21st 2012 in date widgets when using
> Brasil/Rio TZ
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Web.
> https://bugs.launchpad.net/bugs/1068105
>
> Title:
> [6.1] impossible to save October 21st 2012 in date widgets when using
> Brasil/Rio TZ
>
> Status in OpenERP Web:
> New
>
> Bug description:
> Dear OpenERP,
>
> That would be a good joke if this wasn't that soon, what the hell
> happens October 21st ?
> When you set your browser timezone to Brazil (Rio at least), then you
> can not enter the date 10/21/2012, it's automatically rolled back as
> 10/20/2012 once it's saved.
> Actually somebody told me that the date may be correct inside the
> database but "only" displayed incorrectly in the widget.
>
> You can see the whole scenario of the issue on this little enhanced
> video:
> http://www.youtube.com/watch?v=adx3GLQy1WY&feature=plcp
>
> Could be nice if you could fix it before hitting the date as I cannot
> imagine my customer not managing to filter any order properly the
> 21st.
>
> I'm also reporting that through the OPW support channel.
>
> Regard.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openerp-web/+bug/1068105/+subscriptions
>

Revision history for this message
Daniel Reis (dreis-pt) wrote :

A suggestion: maybe using a North America location timezone can provide a workaround for your customer.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Yes, could be an idea Daniel (although requires to change the browser settings of every employee or hack the Javascript to force a time-zone.

The problem seems to occur because in Brazil at least the daylight saving change occurs at midnight which seems to be the time used by OpenERP date widgets. It seems that when daylights saving occurs at different hours the problem does not occur. This is still very annoying: imagine you have to register an invoice for that date, you are in pretty bad shape...

Anyway, there are certainly more important bugs to be fixed before this one but it's good to keep it on the todo list.

Revision history for this message
Daniel Reis (dreis-pt) wrote :

Will this happen again on the next DST change?

Revision history for this message
Cloves Almeida (cjalmeida) wrote :

The issue is with datejs library and our good ol' Brazillian govt.

Fire up the console (you could go to http://www.datejs.com/test/date/index.html to load the library) and type

Date.parseExact('2013-10-20','yyy-MM-dd')

when timezone is set to America/Sao_Paulo.

Since the javascript Date object is in fact a Date/Time object (following Java's flaw) one must set the hh:mm:ss fields to a given value and datejs choose the fairly obvious "00:00:00" Since that time does not exists, it falls back to "23:00:00" of the previous day.

To avoid much grievances most countries choose 2AM to 3AM and back as the changing hours for DST. In such cases, the "date" parsing would correctly not flip the day field and remains simple. But down here...

Would it be weird if I carry to the next demonstration a banner saying "Change DST to 2AM!"? :)

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Previous to OPW report, I want to mention this bug happens day September the 20th this year with the America/Sao_Paulo timezone.

Changed in openerp-web:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello,

So after investigation with OpenERP SA, it looks like this bug is really related to Google Chrome! The problem cannot be reproduced using Firefox or Internet Explorer.

In fact if you try Cloves Almeida's suggestion at comment #10, it works correctly with Firefox but fails with Chrome (both on Windows and Linux).

Google Android users relate more issues with the daylight savings in Brazil http://productforums.google.com/forum/#!topic/chrome/UXnihTLRfWY%5B1-25-true%5D

Can we do anything about it in OpenERP? So is it really a bug inside Google Chrome?

Revision history for this message
Igor Cardoso (gore-crds) wrote :

Here is the work around. Don't use Chrome until Google fixes this problem or DEACTIVATE the Auto update time-zone on your operating system ("in windows it is called Automatically adjust clock for Daylight Savings Time") and everything will work like a charm. Apparently, Google Chrome ignores that function on the operating system, which can really be a pain for whoever uses Google chrome as a browser and is working with such Dates.
The only problem is that you will have with the work around is that you will have to manually update the your daylight savings twice a year.

Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello Igor,

Thanks for your findings, as per discussion on maintenance ticket I am setting it as Wan't fix.

Thanks.

Changed in openerp-web:
status: New → Won't Fix
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.