Bug 27574

Summary: [PATCH] HSSFDateUtil.getExcelDate() is one hour off when DST changes
Product: POI Reporter: Hack Kampbjorn <hak>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: kosherjava
Priority: P3    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Fix for one hour off on DST change days in getExcelDate

Description Hack Kampbjorn 2004-03-10 16:45:34 UTC
When setting a cell's value to the date 2004-03-28 08:00 it is presented as
07:00 in Excel. This only happens on the days when DST starts or ends.
Comment 1 Hack Kampbjorn 2004-03-10 16:46:39 UTC
Created attachment 10747 [details]
Fix for one hour off on DST change days in getExcelDate
Comment 2 kosherjava 2004-06-21 03:22:51 UTC
The same happens with the code below:
HSSFCellStyle cellStyle = wb.createCellStyle();
cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy h:mm"));
cell = row.createCell((short)1);
cell.setCellValue(new Date()); //use test date here. It will be an hour off
cell.setCellStyle(cellStyle);
Comment 3 kosherjava 2004-06-21 03:26:13 UTC
I found this in 2.5 final
Comment 4 Glen Stampoultzis 2004-08-04 00:45:44 UTC
Patch applied to rel-2-branch.  Thanks.