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.
Created attachment 10747 [details] Fix for one hour off on DST change days in getExcelDate
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);
I found this in 2.5 final
Patch applied to rel-2-branch. Thanks.