[MNT-15454] Date conversion error when using America/Sao_Paulo timezone because of daylight saving Created: 26-Dec-15  Updated: 20-Oct-16  Resolved: 09-Jun-16

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: Repository
Affects Version/s: 5.0.3
Fix Version/s: 5.0.4

Type: Bug
Reporter: Douglas Cassiano Rodrigues Paes Assignee: Closed Bugs (Inactive)
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 2 days, 2 hours, 10 minutes
Original Estimate: Not Specified

Attachments: File patch.diff     Text File stacktrace.txt    
Bug Priority:
Category 2
Build Location: https://releases.alfresco.com/Enterprise-5.0/5.0.4/build-00030/ALL/

 Description   

The problem happens in 3 different environments, Mac, Ubuntu and Windows Server, all with Java timezone configured as America/Sao_Paulo.

For attributes of date type, conversion errors are thrown when I try to set some specific dates, like 2015/10/18 or 2014/10/19. Those are daylight saving starting dates.

It's possible to reproduce the error using custom or OOTB content model.

More information here https://github.com/JodaOrg/joda-time/issues/146

The provided patch is not a complete fix but rather a stop gap as the assertion prevents the test from passing due to the timezone difference.



 Comments   
Comment by Douglas Cassiano Rodrigues Paes [ 04-Mar-16 ]

A simple way to test and see the problem by using javascript.

var date = Packages.org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter.INSTANCE.convert(Packages.java.util.Date, '2015-10-19');print(date);

Comment by Douglas Cassiano Rodrigues Paes [ 05-Jul-16 ]

Is this supposed to be available for Community?
I see here it's fixed for Enterprise.

Comment by Douglas Cassiano Rodrigues Paes [ 25-Aug-16 ]

Do you have any information about when this fix will be available in Community?

Comment by Derek Hulley [X] (Inactive) [ 30-Aug-16 ]

This fix will be in the next Community release, which will be in September. We skipped an August release in order to get some more APIs completed.

Comment by Richard Esplin [X] (Inactive) [ 19-Oct-16 ]

Douglas Cassiano Rodrigues Paes Do you still see the issue in 201609?

Ancuta Morarasu Am I correctly interpreting the commit history that it got merged back to Trunk in June?

Comment by Douglas Cassiano Rodrigues Paes [ 20-Oct-16 ]

@Richard Esplin I haven't tested it, as I didn't know which version to use.
I'm going to install it and try to test tomorrow.
Thank you for the information.

Comment by Douglas Cassiano Rodrigues Paes [ 20-Oct-16 ]

I couldn't reproduce the error anymore.

I'm going to wait for the new GA, and then I'll schedule an upgrade.

Thank you

Generated at Sun Mar 07 18:35:48 GMT 2021 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.