[ 
https://issues.apache.org/jira/browse/OFBIZ-5608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15008920#comment-15008920
 ] 

Gareth Carter edited comment on OFBIZ-5608 at 11/17/15 4:18 PM:
----------------------------------------------------------------

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?

**Edit

I should say it's not the America/New_York timezone that is specifically the 
problem, its the fact that America/New_York relative to the servers timezone 
applies a negative offset to java.sql.Date (its subtracting x hours from the 
date) when formatting to a string. As mentioned before java.sql.Date has no 
time component and therefore should not subtract hours or apply offsets


was (Author: gareth.carter):
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)

Reply via email to