You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/03/29 14:08:37 UTC

[Bug 54767] Need to express non-existent date

https://issues.apache.org/bugzilla/show_bug.cgi?id=54767

--- Comment #1 from alex <i8...@gmail.com> ---
I have a requirement that does not seem easy to implement:

The jvm uses Europe/Paris as its default timezone.
We need to put a list of dates into the excel and the list contains an hour
that does not exist in that timezone: 2013-03-31T02:00:00

If we have a list of date objects which contain say "01:00, 02:00, 03:00", the
excel will show "01:00, 03:00, 04:00" because the internal calendar uses the
default timezone.

Our current workaround is to inject the dates not as java.util.Date objects but
rather as numbers. To transform the dates to numbers we use the method
org.apache.poi.ss.usermodel.DateUtil.getExcelDate(Calendar date, boolean
use1904windowing) and pass in a calendar that is set in UTC.

Am I missing something? Can I change the timezone of the internal Calendar or
am I doing something wrong? Is it possible to expose the timezone settings of
said calendar instead of using the default one?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org