Skip to content

Commit

Permalink
Merge pull request qax-os#91 from takayuki/time-round-off-error
Browse files Browse the repository at this point in the history
Fix round-off error in representation of date and time values
  • Loading branch information
xuri authored Jul 31, 2017
2 parents 308776e + 88d10ff commit b327eb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
Expand Down

0 comments on commit b327eb5

Please sign in to comment.