[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-5608: --- Attachment: en-GB calendar tootip.png > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: Release Branch 12.04, Release Branch 13.07, Trunk >Reporter: Rupert Howell >Assignee: Jacques Le Roux >Priority: Minor > Attachments: DateField_1.jpg, DateField_2.jpg, French calendar > tootip.png, IgnoreTimeZone.patch, ObjectTypeTests.patch, dates.patch, > dates_1589040.patch, en-GB calendar tootip.png, sqldate_scenarios.png > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-5608: --- Attachment: French calendar tootip.png > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: Release Branch 12.04, Release Branch 13.07, Trunk >Reporter: Rupert Howell >Assignee: Jacques Le Roux >Priority: Minor > Attachments: DateField_1.jpg, DateField_2.jpg, French calendar > tootip.png, IgnoreTimeZone.patch, ObjectTypeTests.patch, dates.patch, > dates_1589040.patch, sqldate_scenarios.png > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-5608: --- Attachment: DateField_2.jpg DateField_1.jpg The attached screenshots sow the problem. https://localhost:8443/partymgr/control/editperson?partyId=admin If my locale is en, the tooltip says the format is "-MM-dd". If I type in a date in that format and click Save, the field is left empty (the typed-in date was ignored). If I select a date from the calendar popup, then the date appears as "MM/dd/", and the new value is saved. If my locale is en-GB, the tooltip shows the correct format. If I type in a date in that format and click Save, the field is saved. I added a log statement to MacroFormRenderer.java to see what value is being generated, and it is in the format specified in ModelFormField.java, line 345, but somehow the HTML macros are transforming it to another format. This is bad, because that means the date will be displayed one way in HTML, and it will be rendered as "-MM-dd" in all other formats. > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: Release Branch 12.04, Release Branch 13.07, Trunk >Reporter: Rupert Howell >Assignee: Jacques Le Roux >Priority: Minor > Attachments: DateField_1.jpg, DateField_2.jpg, IgnoreTimeZone.patch, > ObjectTypeTests.patch, dates.patch, dates_1589040.patch, sqldate_scenarios.png > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-5608: --- Attachment: IgnoreTimeZone.patch Gareth - try out the attached file: IgnoreTimeZone.patch. I added an attribute called "ignore-time-zone" to the date-time field widget and the service parameters. Set the attribute to "true" on date-time field widgets you are having problems with, and also set it to true for the corresponding service IN parameters. > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: Release Branch 12.04, Release Branch 13.07, Trunk >Reporter: Rupert Howell >Priority: Minor > Attachments: IgnoreTimeZone.patch, ObjectTypeTests.patch, > dates.patch, dates_1589040.patch, sqldate_scenarios.png > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gareth Carter updated OFBIZ-5608: - Attachment: sqldate_scenarios.png As suggested by Adrian, I have attached an image of 3 flow diagrams depicting what I believe is happening when using java.sql.Date and db type SQL DATE with different timezones for user, app server and database server. > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: Release Branch 12.04, Release Branch 13.07, Trunk >Reporter: Rupert Howell >Priority: Minor > Attachments: ObjectTypeTests.patch, dates.patch, dates_1589040.patch, > sqldate_scenarios.png > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sharan Foga updated OFBIZ-5608: --- Sprint: Bug Crush Event - 21/2/2015 > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: Release Branch 12.04, Release Branch 13.07, Trunk >Reporter: Rupert Howell >Assignee: Adrian Crum >Priority: Minor > Attachments: ObjectTypeTests.patch, dates.patch, dates_1589040.patch > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-5608: --- Attachment: ObjectTypeTests.patch I have attached a test case to demonstrate what I have been trying to teach. The millisecond value in java.util.Date and its subclasses references a time zone. Once that is understood, the flaws in the proposed "fixes" will be obvious. > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: SVN trunk, Release Branch 12.04, Release Branch 13.07 >Reporter: Rupert Howell >Priority: Minor > Fix For: SVN trunk > > Attachments: ObjectTypeTests.patch, dates.patch, dates_1589040.patch > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gareth Carter updated OFBIZ-5608: - Attachment: dates_1589040.patch This issue has not been fixed, I have updated the patch for the current trunk rev and also updated webtools ListGeneric.ftl because freemarker has exactly the same problem when you use ?string builtin I believe there is the assumption that because java.sql.Date inherits from java.util.Date that it should behave in a similar way where formatting is concerned but if you take a look at http://www.date4j.net/ or even the source code for java.sql.Date, you can see that the overridden toString and static valueOf (which doesn't exist in java.util.Date) do not reference any timezone. Whereas java.util.Date toString can output the default timezone and you have to use a DateFormat object to parse a string > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: SVN trunk, Release Branch 12.04, Release Branch 13.07 >Reporter: Rupert Howell >Priority: Minor > Fix For: SVN trunk > > Attachments: dates.patch, dates_1589040.patch > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gareth Carter updated OFBIZ-5608: - Attachment: dates.patch test case was incorrect. > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: SVN trunk, Release Branch 12.04, Release Branch 13.07 >Reporter: Rupert Howell >Priority: Minor > Fix For: SVN trunk > > Attachments: dates.patch > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gareth Carter updated OFBIZ-5608: - Attachment: (was: dates.patch) > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: SVN trunk, Release Branch 12.04, Release Branch 13.07 >Reporter: Rupert Howell >Priority: Minor > Fix For: SVN trunk > > Attachments: dates.patch > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gareth Carter updated OFBIZ-5608: - Attachment: dates.patch I have uploaded a patch to: 1) Fix Adrian's code in commit 1585033 2) Not apply timezone to date only fields 3) Provide test case for date only fields I have also updated other classes with UtilDateTime.toDateFormat (setting timezone to null). I believe this should be the correct and consistent behaviour > Dates Displaying Incorrectly With Negative Offest Timezones. > > > Key: OFBIZ-5608 > URL: https://issues.apache.org/jira/browse/OFBIZ-5608 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS >Affects Versions: SVN trunk, Release Branch 12.04, Release Branch 13.07 >Reporter: Rupert Howell >Priority: Minor > Fix For: SVN trunk > > Attachments: dates.patch > > > Dates are displaying incorrectly when negative offset (relative to UTC) are > applied by the users settings. -- This message was sent by Atlassian JIRA (v6.2#6252)