summaryrefslogtreecommitdiff
path: root/date.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-05-10 00:09:24 +0800
committerxuri <xuri.me@gmail.com>2021-05-10 00:09:24 +0800
commitbe12cc27f1d774154b17763c071e1dc6f91eab8c (patch)
treed6544c2e33e8aacfb0867e79ffc69fde435d3183 /date.go
parent423bc26d1f87db55bab5704afebf4509269bbc7e (diff)
This closes #652, new SetColWidth API, support set column width in stream writing mode, and export error message
Diffstat (limited to 'date.go')
-rw-r--r--date.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/date.go b/date.go
index 3e50e3d..9ef5caf 100644
--- a/date.go
+++ b/date.go
@@ -12,7 +12,6 @@
package excelize
import (
- "errors"
"math"
"time"
)
@@ -35,7 +34,7 @@ func timeToExcelTime(t time.Time) (float64, error) {
// Because for example 1900-01-01 00:00:00 +0300 MSK converts to 1900-01-01 00:00:00 +0230 LMT
// probably due to daylight saving.
if t.Location() != time.UTC {
- return 0.0, errors.New("only UTC time expected")
+ return 0.0, ErrToExcelTime
}
if t.Before(excelMinTime1900) {