Bug 54909 - DataFormatter takes daylight saving time into account
Summary: DataFormatter takes daylight saving time into account
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 11:35 UTC by j_handrick
Modified: 2015-09-07 20:01 UTC (History)
0 users



Attachments
unit test (1.07 KB, application/octet-stream)
2013-04-30 11:40 UTC, j_handrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description j_handrick 2013-04-30 11:35:51 UTC
When the DataFormatter formats a date, it sometimes does not display the value from the view in Excel. Daylight Saving Time started on March 31st 2013. In Excel it displays 31.03.2013 02:00:00, while the DataFormatter formats it to 31.03.2013 03:00:00. After that, the date is displayed as in the view (for example 31.03.2013 04:00:00).
Comment 1 j_handrick 2013-04-30 11:40:58 UTC
Created attachment 30243 [details]
unit test

Unit test showing different DataFormatter formattings
Comment 2 Nick Burch 2013-04-30 14:22:05 UTC
DataFormatter largely relies on the underlying Java Date Formatter classes, which in turn will depend on the system timezone. Could it be that your system isn't in the same timezone you expect?
Comment 3 Nick Burch 2013-04-30 14:24:16 UTC
FYI I've just tried your unit test on a machine set to a UK locale + timezone, and it passes just fine
Comment 4 Dominik Stadler 2015-09-07 20:01:44 UTC
Based on the comments from Nick I am closing this as WORKSFORME, especially as we did not get any response on the questions.

For 3.13 we are working on some more support for different Timezones, but overall it should be possible to the set the Timezone for the JavaVM that executes the code to whatever value you would like to see begin applied.