[jira] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15080873#comment-15080873 ] Gareth Carter commented on OFBIZ-5608: -- Thats the thing isn't it? There is no case. For date only fields, there is not enough information to accurately apply different timezone formats. For all date fields you'd have to ensure you set ignore-time-zone="false" but I fear this functionality will get lost or misunderstood later down the line hence why I tried to apply the fix globally (in widget framework) > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15076752#comment-15076752 ] Scott Gray commented on OFBIZ-5608: --- I know this is a long ticket and I don't want to rehash all of this, but I am confused. Under what circumstances would we ever use the following: {code:xml} {code} I can't think of a date when that we'd ever want to apply timezone formatting to. > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008536#comment-15008536 ] Pierre Smits commented on OFBIZ-5608: - Having is worthy of a separate issue. > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008654#comment-15008654 ] Jacques Le Roux commented on OFBIZ-5608: And to be totally clear it does not depend on browser locale, I have it using fr and when selecting en-GB in OFBiz get this !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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008655#comment-15008655 ] Jacques Le Roux commented on OFBIZ-5608: So it seems we only need OFBIZ-6731, and action here of course > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008520#comment-15008520 ] Gareth Carter commented on OFBIZ-5608: -- Actually from what I remember, we had to change the VisualThemeResource to load the UK datejs file, something has changed in trunk for this to happen as I am pretty sure datejs was loaded from browsers locale. The only other object I would advise to handle is a string object which represents a date/time/date-time in ISO format only but this a matter of opinion. You could just leave it as java.sql.Date is the object only used to represent a date field throughout ofbiz (including java.sql.Time for time and java.sql.Timestamp for date-time) 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008595#comment-15008595 ] Jacques Le Roux commented on OFBIZ-5608: Maybe it's related with my last action on this with r1712091, but I doubt. I can't say for R13.07 since we removed example (in specialpurpose, allow me a facepalm here) but it was still working in R12.04, just check old demo (this is in FormWidgetExamples) > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008586#comment-15008586 ] Jacques Le Roux commented on OFBIZ-5608: Works also on trunk demo for fr-FR with FlatGrey > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008581#comment-15008581 ] Jacques Le Roux commented on OFBIZ-5608: About the calendar tooltip, it works OOTB here !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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008920#comment-15008920 ] Gareth Carter commented on OFBIZ-5608: -- I have created a person on trunk with locale set to en-US, setting the Birth Date field to today (2015-11-17), the hidden field is 2015-11-17 (as expected), the display field shows 11/17/2015. The value is stored in the database and displays in the same format on screen when retrieved. The only issue was the value stored in the database was 2015-11-16 because the admin timezone is set to America/New_York (the problem that this jira represents). Might be worth moving the discussion of formats to another jira? > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008946#comment-15008946 ] Jacques Le Roux commented on OFBIZ-5608: Yes I will create another issue indeed > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008773#comment-15008773 ] Gareth Carter commented on OFBIZ-5608: -- Ok I tried on trunk, it seems to be working though the formats specified by datejs do not correspond to the formats specified in CommonUiLabels for tooltips. Examples: - Germany (DE), datejs uses dd.MM. format but tooltip specifies -MM-dd (both are valid). - USA (en-US), datejs uses M/d/ where tooltip specified -MM-dd France and British formats are the same I have not checked others but no doubt there are some missing or wrong > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008816#comment-15008816 ] Pierre Smits commented on OFBIZ-5608: - Fixing the tooltip might go a long way in enhancing the UX. > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008822#comment-15008822 ] Jacques Le Roux commented on OFBIZ-5608: Right I just tried en-US and the tooltip is OK (-MM-dd) but not the field (11/17/2015). From your experience, it could be a combination between the browser and the date.js value. Also in example we have not the value coming back from the DB, I will check that also. > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008726#comment-15008726 ] Jacques Le Roux commented on OFBIZ-5608: Correct (17/11/2015), you can try on trunk demo > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008690#comment-15008690 ] Gareth Carter commented on OFBIZ-5608: -- Yes the tooltip doesn't but what if you select a date from the picker? What format is the viewable input field? > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008458#comment-15008458 ] Jacques Le Roux commented on OFBIZ-5608: Thanks for details Gareth, Actually it's not based on browser locale, see , something must be wrong in between. We should create another Jira minor improvement for that. So back to our main subject (pfew...). It seems we have to review case by case if we don't want to break anything. I believe both date and time types should use ignore-time-zone=true by default and special cases should be handled otherwise. I even wonder why there should be special cases. BTW, I noticed there is only 1 (in FormWidgetExampleForms.xml )and 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008380#comment-15008380 ] Gareth Carter commented on OFBIZ-5608: -- I was under the impression that ofbiz will always render date/time fields as ISO format into the hidden field and let the javascript framework handle internationalization of the viewable field. This can certainly lead to the tooltip displaying a different format from the actual input. Tooltip text is based on the user login locale, but the javascript is dependent on the browser locale > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006619#comment-15006619 ] Jacques Le Roux commented on OFBIZ-5608: I did not check this point > I expected the widget framework could handle other objects > (java.sql.Timestamp, java.sql.Time, java.util.Date, maybe even string?) >It should only made true by default for date only (and maybe time only) I agree on both points > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006590#comment-15006590 ] Jacques Le Roux commented on OFBIZ-5608: [~adrian.c...@yahoo.com], I checked your assertion about // FIXME: modelFormField.getEntry ignores shortDateInput when converting Date objects to Strings. I put a breaking point in ModelFormField.getEntry(), but it's never used in relation with shortDateInput which is only used in htmlFormMacroLibrary.renderDateTimeField macro. I found that it works well, but when you come back to the options page xhen creating an order in order manager > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007123#comment-15007123 ] Adrian Crum commented on OFBIZ-5608: Please review this code: MacroFormRenderer.java, line 549 MacroFormRenderer.java, line 561 ModelFormField.java, line 345 Then look at the UI label being used in MacroFormRenderer.java, line 561: {code} النمط: ي ي-ش ش-ع ع ع ع Formát datumu: -MM-dd Datumsformat: -MM-dd Format: -MM-dd Format: dd/MM/ Formato: dd/mm/ Format: JJ/MM/ प्रारूप: -MM-dd Formato: -MM-gg 書式: -MM-dd Format: -MM-dd Formato: -MM-dd Формат: -ММ-дд รูปแบบ : -MM-dd Định dạng ngày tháng: -MM-dd 格式: -MM-dd 格式: -MM-dd {code} If my locale is en-GB, the screen tells me to enter a date in the format "dd/MM/", but ModelFormField.java, line 345 is rendering it as "-MM-dd". > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007065#comment-15007065 ] Jacques Le Roux commented on OFBIZ-5608: What do you call short format? I guess it's something else than UtilDateTime.DATE_FORMAT, but then what? Also I don't see the relation with shortDateInput as explained above, do I miss something? > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006941#comment-15006941 ] Adrian Crum commented on OFBIZ-5608: Look at ModelFormField.java, line 339 and 345. The short format is ignored when the date string is created. > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007377#comment-15007377 ] Jacques Le Roux commented on OFBIZ-5608: Could you please give an use case (an example) I tried 3 plaes w/o finding "dd/MM/" # catalog/control/ProductStoreFacilities?productStoreId=9000 # example/control/FormWidgetExamples # humanres/control/PublicHoliday > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007468#comment-15007468 ] Jacques Le Roux commented on OFBIZ-5608: !https://i.imgur.com/t0XHtgJ.gif! > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007500#comment-15007500 ] Jacques Le Roux commented on OFBIZ-5608: Ha I can see it with Flat Grey, but really not easy... > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007526#comment-15007526 ] Jacques Le Roux commented on OFBIZ-5608: Got it also with Tomahawk, a masterstroke! > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007446#comment-15007446 ] Jacques Le Roux commented on OFBIZ-5608: Thanks, I guess it's due to js format used in htmlFormMacroLibrary.renderDateTimeField macro, I will check that tmrw... > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007485#comment-15007485 ] Adrian Crum commented on OFBIZ-5608: Exactly! I have gone down that road many times trying to fix problems in the framework. That is why I proposed rewriting it. > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007495#comment-15007495 ] Jacques Le Roux commented on OFBIZ-5608: Weirdly I can't see the tooltip popping up here, neither in French (fr) or English (en) nor with Tomahawk or Flat Grey either in FF or Chrome :-o > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007247#comment-15007247 ] Jacques Le Roux commented on OFBIZ-5608: OK, I only checked in ViewGeneric.ftl, it's hardcoded there (line 140...) > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007224#comment-15007224 ] Jacques Le Roux commented on OFBIZ-5608: Thanks, I see your point now, seems it's only an issue in UI tip, checking... > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007267#comment-15007267 ] Jacques Le Roux commented on OFBIZ-5608: Fixed with OFBIZ-6727 > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007347#comment-15007347 ] Jacques Le Roux commented on OFBIZ-5608: Really feeling like shaving the yak... > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006348#comment-15006348 ] Jacques Le Roux commented on OFBIZ-5608: It seems to work correctly, just try it. I did by creating a requestroles and checking in the main request view > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006473#comment-15006473 ] Gareth Carter commented on OFBIZ-5608: -- It is expected that when is used the displayed data comes from java.sql.Date but I expected the widget framework could handle other objects (java.sql.Timestamp, java.sql.Time, java.util.Date, maybe even string?). My guess is the majority of cases is java.sql.Date It should only made true by default for date only (and maybe time only) > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006032#comment-15006032 ] Jacques Le Roux commented on OFBIZ-5608: Hi Gareth, I did a similar search in Eclipse and got exactly the same result (15 entries). They are: * FixedAsset ** expectedEndOfLife ** actualEndOfLife * AcctgTransEntry ** dueDate * JobRequisition ** jobRequisitionDate ** requiredOnDate * JobInterview ** jobInterviewDate * TechDataCalendarExcWeek ** exceptionDateStart * OrderSummaryEntry ** entryDate * Person ** birthDate ** deceasedDate ** passportExpireDate * CustomTimePeriod ** fromDate ** thruDate * TestFieldType ** dateField * DateDimension ** dateValue It seems to me that all these dates are plain dates (aka SQL Date/java.sql.Date) and not date-times (aka SQL TIMESTAMPTZ/java.sql.Timestamp). So no issues expected there. I also did a research of {code}{code} in \*form\*.xml files and found 42 entries. So, it's a bit harder to review, not only because of the number but also because fields names speak less for themselves. I still expect that if the specific type="date" has been selected a SQL date is supposed, not a Timestamp. For FTL templates it's finally easier than supposed. There is only 4 shortDateInput=true cases, with 2 in Webtools. Unfortunately it does not seems to work correctly. I noted this Adrian's comment in MacroFormRenderer: // FIXME: modelFormField.getEntry ignores shortDateInput when converting Date objects to Strings. This is another subject; so another issue should be created... A maybe related issue is if you set shortDateInput=true in order manager optionsettings.ftl, when you come back to the screen, the calendar button does not appear. To summarize I believe we should make true by defaut the ignore-time-zone and specifically handle cases where it does not fit. They should not be many because they are anomalies if we consider that a plain date has no time associated. > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006060#comment-15006060 ] Pierre Smits commented on OFBIZ-5608: - I wonder what the effect is and will be regarding the display fields. > 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14993659#comment-14993659 ] Gareth Carter commented on OFBIZ-5608: -- Patch works. To test: - Set timezone to Europe/London - Modify PartyForms.xml#EditPerson. Add the following to the form: {code} {code} - Create a new person with birth date edited - Change timezone to America/New_York - Edit person and you should see birthdate is the same value when set in Europe/London timezone - If you change ignore-time-zone = "false" and edit again, the birthdate field should contain the original date - 1 day With the patch as it is, none of the forms with a date only field will have ignore-time-zone="true" set, so ofbiz will behave as it does without this patch. Would there be any plans to update existing forms? Eg PartyForms.xml#EditPerson > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14991932#comment-14991932 ] Jacques Le Roux commented on OFBIZ-5608: What is the status here? > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14991952#comment-14991952 ] Gareth Carter commented on OFBIZ-5608: -- I need to test again, OFBIZ-6537 prevented me but now that is fixed I will try > 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14602628#comment-14602628 ] Gareth Carter commented on OFBIZ-5608: -- Can't test due to https://issues.apache.org/jira/browse/OFBIZ-6537. I have yet to find the cause 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14600990#comment-14600990 ] Gareth Carter commented on OFBIZ-5608: -- I do not know if it does rounding - but it certainly seems to ignore the time when storing and normalizes the time to midnight on retrieval as per API. You just set the time to midnight in the converters which should happen anyway. I don't believe there will be any data corruption if app servers have different timezones. If you use the system timezone on any instance to create a java.sql.Date from a string and store that java.sql.Date into the database using PreparedStatement.setDate(i, x) then the output of toString() will be what is stored in the database. Personally I believe most jdbc drivers work with the year/month/day values that the java.sql.Date represents in the system timezone rather than the millisecond value that is actually used 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14600994#comment-14600994 ] Gareth Carter commented on OFBIZ-5608: -- It looks fine. I have concerns though about all the existing fields that use SQL Date - will these get updated with ignore-time-zone=true? With a little digging I can see the following entities that use SQL Date: $ grep -R --exclude-dir=.svn --include=*.xml type=\date\ . | grep entitydef ./applications/accounting/entitydef/entitymodel.xml:field name=expectedEndOfLife type=date/field ./applications/accounting/entitydef/entitymodel.xml:field name=actualEndOfLife type=date/field ./applications/accounting/entitydef/entitymodel.xml: field name=dueDate type=date/field ./applications/humanres/entitydef/entitymodel.xml:field name=jobRequisitionDate type=date/field ./applications/humanres/entitydef/entitymodel.xml:field name=requiredOnDate type=date/field ./applications/humanres/entitydef/entitymodel.xml:field name=jobInterviewDate type=date/field ./applications/manufacturing/entitydef/entitymodel.xml: field name=exceptionDateStart type=date/field ./applications/order/entitydef/entitymodel.xml: field name=entryDate type=date/field ./applications/party/entitydef/entitymodel.xml: field name=birthDate type=date/field ./applications/party/entitydef/entitymodel.xml: field name=deceasedDate type=date/field ./applications/party/entitydef/entitymodel.xml: field name=passportExpireDate type=date/field ./framework/common/entitydef/entitymodel.xml: field name=fromDate type=date/field ./framework/common/entitydef/entitymodel.xml: field name=thruDate type=date/field ./framework/entity/entitydef/entitymodel_test.xml:field name=dateField type=date/ ./specialpurpose/bi/entitydef/entitymodel.xml:field name=dateValue type=date 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14601397#comment-14601397 ] Adrian Crum commented on OFBIZ-5608: I need to know if the patch solves your problem. The feature can be used wherever we need a java.util.Date (or one of its subclasses) that does not reference the user's time zone. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14601429#comment-14601429 ] Gareth Carter commented on OFBIZ-5608: -- I will confirm and get back to you but on initial inspection of the patch, it seems like it would do the job. I doubt that this would be useful for anything but java.sql.Date and maybe java.sql.Time. It makes no sense to apply a different timezone to java.sql.Date when you don't know the time or to java.sql.Time when you don't know the date. I supposed for java.sql.Time you could use the current date but depending on the system timezone, user's timezone and current date the outcome could change from one day to another (eg DST) 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14600234#comment-14600234 ] Adrian Crum commented on OFBIZ-5608: Thank you Gareth! I think we need an option in the form widget date field to ignore the user's time zone. The implementation would use UTC for conversions instead of the user's (or server's) time zone. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14600235#comment-14600235 ] Gareth Carter commented on OFBIZ-5608: -- Forgot to mention, I have observed this behaviour with 3 jdbc drivers, derby, postgresql and mysql. Seems to me like these jdbc drivers do as per API spec but other jdbc drivers may work differently 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14600241#comment-14600241 ] Gareth Carter commented on OFBIZ-5608: -- I believe it would have to be systems timezone as the jdbc driver uses the system timezone when setting and pulling java.sql.Date (and others!) but this should only apply to java.sql.Date If you use UTC, it will still causes issues if the systems timezone is not UTC 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14600253#comment-14600253 ] Adrian Crum commented on OFBIZ-5608: The Derby driver will round the time component of java.sql.Date when it stores it in the DB - that is why I updated the converters to remove the time component. Well, we can try using the default time zone. I was concerned about data corruption if all servers in a cluster do not have the same time zone. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13982923#comment-13982923 ] Gareth Carter commented on OFBIZ-5608: -- The java.sql.Date has no beginning or end as described by the API documentation: public int getHours() Deprecated. This method is deprecated and should not be used because SQL Date values do not have a time component. My patch doesnt assume that, it removes the code in Ofbiz to convert it to another timezone to be displayed to the end user based on their preference. Applying the local timezone offset is done within java.util.Date and is out of our control - again the only reason this is done is to normalize the millisecond value to local time. 2014-01-01 00:00:00 will have different millisecond values in UK and in France The point is, you cannot accurately apply a timezone to java.sql.Date because it doesnt have a time. Ofbiz is currently applying the user preference timezone which will display incorrectly when the offset of the user preference is lower (greater negative offset) than the local timezone (local timezone never changes in ofbiz). If you had 2 ofbiz servers pointing to the same database but are in different timezones, the birth date field will display differetly on each server depending on your user pref. Ofbiz1 is in UK Ofbiz2 is in GMT-4 User Pref is GMT-3 Date from database: 2014-01-01 (00:00:00) UK milliseconds = 138853440 GMT-4 milliseconds = 138854880 Applying timezone GMT-3 from UK yields 2013-12-31 (21:00:00) Applying timezone GMT-3 from GMT-4 yields 2014-01-01 (01:00:00) Which one is correct? If you really think this is wrong, close this jira as won't fix and we'll just apply as a local 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: 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13983015#comment-13983015 ] Adrian Crum commented on OFBIZ-5608: I won't close the issue because you have identified a problem that needs to be fixed. Your patch will not be committed because it is the wrong approach and it doesn't fix the problem. I will continue to work on this issue. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13982006#comment-13982006 ] Adrian Crum commented on OFBIZ-5608: Your testcase proves this but is irrelevant But it IS relevant. WHEN does the date begin? It depends on the time zone. I cannot see any flaws in fixing ofbiz to not apply a timezone to java.sql.Date only Because you ARE applying a time zone to java.sql.Date - the default time zone. That was the point of my test case. Your patch assumes removing a reference to a TimeZone fixes the problem, but it doesn't. It doesn't REMOVE the time zone reference from java.sql.Date, it merely switches it to a different one. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13979515#comment-13979515 ] Gareth Carter commented on OFBIZ-5608: -- Adrian The millisecond value does not reference a timezone, the millisecond value is the epoch value. However, java.util.Date will use the default java timezone to normalize the millisecond value to local time by applying an offset. Your testcase proves this but is irrelevant because java.sql.Date is not supposed to represent a specific instance in time like java.util.Date but simply an abstract date that does not change according to timezone, such as birthdate or christmas. People may celebrate christmas at different times but christmas day is always 25/12 of every year. When you use java.sql.Date, the time will always be set to midnight when using the deprecated constructors or static valueOf method in the local time. Again the milliseconds value will be different depending on default timezone but ultimately the value returned from toString() will be the same no matter the timezone. java.util.Date toString() displays the java default timezone whereas java.sql.Date does not. Why? There is no need if it only represents a date. When the java.sql.Date is formatted (using DateFormat) with a timezone that has a larger negative offset to the local time then the result will be the previous day. Basically any timezone west of current local time will display the previous day and any timezone east will not change the date (except for if local time is -12 and timezone applied was +12 or vice versa). This is very inconsitent behaviours. If the time was set to midday then other timezones will display correctly. I have also checked postgres, no matter which timezone I apply on the database, the sql date displays the same date. No matter what the default java timezone is the java.sql.Date will display correctly without applying another timezone. You have to ask yourself why is there no data type of date with timezone? SQL dates are fixed dates and because you cannot correctly apply a timezone to date without knowing a time! This seems to be the same for mysql and mssql if you read the documentation. It is at the point that ofbiz applies the user pref timezone to java.sql.Date that is causing this issue. I cannot see any flaws in fixing ofbiz to not apply a timezone to java.sql.Date only (how many sql date fields are there?). If we were not to apply a timezone to java.util.Date then I can see problems but you have to remember what each class represents. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13978016#comment-13978016 ] Rupert Howell commented on OFBIZ-5608: -- That comment directly disagrees with the javadocs. From the java docs for java.sql.Date which is a subclass of java.util.Date and what is pulled back from the DB and converted to a java.util.Date then formatted. To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated. http://docs.oracle.com/javase/7/docs/api/java/sql/Date.html Which is EXACTLY what I am seeing. Any negative offset applied moves the date back a day because as far as the formatter is concerned its midnight and needs to be changed to 11pm the previous night. } else if (retVal instanceof java.sql.Date) { DateFormat df = UtilDateTime.toDateFormat(UtilDateTime.DATE_FORMAT, timeZone, null); return df.format((java.util.Date) retVal); 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13976783#comment-13976783 ] Adrian Crum commented on OFBIZ-5608: From my perspective, the assumption being made is that a date does NOT reference a time zone. A date has a beginning and end. When does the day begin? It depends on which time zone you are referring to. When does the day end? Again, it depends on which time zone you are referring to. ...you can see that the overridden toString and static valueOf (which doesn't exist in java.util.Date) do not reference any timezone. That statement is false. Take some time to trace through the constructor, and you will see that the millisecond value is derived from a java.util.Calendar instance - which references a time zone. I agree the FreeMarker template issue needs to be fixed, but I don't recommend we hack up the framework to remove all TimeZone references. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13976826#comment-13976826 ] Gareth Carter commented on OFBIZ-5608: -- A date has a beginning and end. When does the day begin? It depends on which time zone you are referring to. When does the day end? Again, it depends on which time zone you are referring to. A date/time has a beginning and end, a date only which java.sql.Date represents does not. Looking at the source code, it throws an exception when calling any of the time methods and toString and valueOf only cares about the date. For postgres I know that the jdbc driver returns a java.sql.Date with the time always set to midnight. No matter which timezone with a negative offset you use, the output will always be the previous day when formatting java.util.Date and all subclasses 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13976835#comment-13976835 ] Rupert Howell commented on OFBIZ-5608: -- Adrian Will you please perform this test. It takes seconds to perform. Update a person record through partymgr and assign them a birthdate of any day. Change your timezone in OFBIz to GMT -12. Go back into the person record and keep updating it. Every update decrements a day from the birthday. I have just tested this and it is happening on trunk still. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13976841#comment-13976841 ] Adrian Crum commented on OFBIZ-5608: For postgres I know that the jdbc driver returns a java.sql.Date with the time always set to midnight. Exactly! But midnight where? Midnight depends on the time zone being referenced. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13976894#comment-13976894 ] Gareth Carter commented on OFBIZ-5608: -- No where. SQL dates don't have a time component, the jdbc driver (or all drivers) have to to set the time in java.sql.Date simply because it inherits from java.util.Date which does have a time component. It doesn't matter which timezone you pick on the database, the sql date fields never change. Reading up on SQL standards http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt Therefore, datetime data types that contain time fields (TIME and TIMESTAMP) are maintained in Universal Coordinated Time (UTC), with an explicit or implied time zone part. Seems to suggest that only fields with a time component should only be affected by timezone 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13977271#comment-13977271 ] Adrian Crum commented on OFBIZ-5608: Rupert - I can confirm there are problems with the birthdate field in the Edit Person screen. I believe the problem is caused by the embedded JavaScript. If I enter 23/04/2014 in the field, the String value passed to the service engine is 2014-04-22. I believe this is caused by a flaw in the JavaScript. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13977340#comment-13977340 ] Rupert Howell commented on OFBIZ-5608: -- I disagree. Gareth has proved conclusively where the problem lies - provided test cases and patches. I have stepped through this code umpteen times. Please step through the code, it is really clear what is happening in the places I mentioned at the very beginning of this thread. Any modification to the JS to get this to work will be a hack to workaround the fact a timezone shouldn't be being applied to a Date. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13977349#comment-13977349 ] Adrian Crum commented on OFBIZ-5608: The only thing Gareth has proven to me is that he doesn't understand how the Java temporal classes work. It would help move things along better if both of you would take the time to understand how Java implements dates and times, so we can work together to solve this problem. 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13974025#comment-13974025 ] Jacopo Cappellato commented on OFBIZ-5608: -- Has this issue been fixed? 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13956447#comment-13956447 ] Rupert Howell commented on OFBIZ-5608: -- This issue exists in both the trunk and release 13.07. To replicate: With server (app and db) set to GB or UTC Timezone update the birthDate record on a Person. Change the user timezone to anything with a negative offset then view the record. The date displayed is 1 day behind the date in the database. This is confusing particularly in the case of birth dates. 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 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13956573#comment-13956573 ] Rupert Howell commented on OFBIZ-5608: -- The issue exists in 12.04. 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 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] [Commented] (OFBIZ-5608) Dates Displaying Incorrectly With Negative Offest Timezones.
[ https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13956653#comment-13956653 ] Rupert Howell commented on OFBIZ-5608: -- The timezone that is being used on line 666 of ModelFieldForm.java is using the User Set timezone. This either needs to apply the server setting or not be applied atall. Before formatting the retVal is correct after it is 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 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)