Bug 27574 - [PATCH] HSSFDateUtil.getExcelDate() is one hour off when DST changes
Summary: [PATCH] HSSFDateUtil.getExcelDate() is one hour off when DST changes
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: All All
: P3 normal with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-10 16:45 UTC by Hack Kampbjorn
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments
Fix for one hour off on DST change days in getExcelDate (8.30 KB, patch)
2004-03-10 16:46 UTC, Hack Kampbjorn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.