From f5a20fa03f2abd9edfa2f9da66680e987fffae79 Mon Sep 17 00:00:00 2001 From: xuri Date: Tue, 20 Apr 2021 15:20:46 +0000 Subject: [PATCH] Fixed #823, 12/24 hours time format parsing error --- cell_test.go | 2 +- styles.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cell_test.go b/cell_test.go index 026189c0..51ee9564 100644 --- a/cell_test.go +++ b/cell_test.go @@ -121,7 +121,7 @@ func TestSetCellValues(t *testing.T) { v, err := f.GetCellValue("Sheet1", "A1") assert.NoError(t, err) - assert.Equal(t, v, "12/31/10 12:00") + assert.Equal(t, v, "12/31/10 00:00") // test date value lower than min date supported by Excel err = f.SetCellValue("Sheet1", "A1", time.Date(1600, time.December, 31, 0, 0, 0, 0, time.UTC)) diff --git a/styles.go b/styles.go index d58281d7..15234fd2 100644 --- a/styles.go +++ b/styles.go @@ -48,7 +48,7 @@ var builtInNumFmt = map[int]string{ 19: "h:mm:ss am/pm", 20: "h:mm", 21: "h:mm:ss", - 22: "m/d/yy h:mm", + 22: "m/d/yy hh:mm", 37: "#,##0 ;(#,##0)", 38: "#,##0 ;[red](#,##0)", 39: "#,##0.00;(#,##0.00)",