From 88d10ff27b28396f874408d56772554ad767d021 Mon Sep 17 00:00:00 2001 From: Takayuki Usui Date: Mon, 31 Jul 2017 09:23:39 +0900 Subject: [PATCH] Fix round-off error in representation of date and time values --- cell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cell.go b/cell.go index 3ac7441f..5d9557c9 100644 --- a/cell.go +++ b/cell.go @@ -60,7 +60,7 @@ func (f *File) SetCellValue(sheet, axis string, value interface{}) { case []byte: f.SetCellStr(sheet, axis, string(t)) case time.Time: - f.SetCellDefault(sheet, axis, strconv.FormatFloat(float64(timeToExcelTime(timeToUTCTime(value.(time.Time)))), 'f', -1, 32)) + f.SetCellDefault(sheet, axis, strconv.FormatFloat(float64(timeToExcelTime(timeToUTCTime(value.(time.Time)))), 'f', -1, 64)) f.setDefaultTimeStyle(sheet, axis) case nil: f.SetCellStr(sheet, axis, "")