Z suffix should be no-op

This commit is contained in:
Yasuhiro Matsumoto
2015-04-15 16:26:27 +09:00
parent 5f64400729
commit dee1a37fe1
2 changed files with 42 additions and 1 deletions

View File

@@ -650,6 +650,7 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
switch rc.decltype[i] {
case "timestamp", "datetime", "date":
var t time.Time
s = strings.TrimSuffix(s, "Z")
for _, format := range SQLiteTimestampFormats {
if timeVal, err = time.ParseInLocation(format, s, time.UTC); err == nil {
t = timeVal