diff options
author | Micah Stetson <micah@stetsonnet.org> | 2012-12-29 14:47:17 -0800 |
---|---|---|
committer | Micah Stetson <micah@stetsonnet.org> | 2012-12-29 14:47:17 -0800 |
commit | f6d10a2a5851307e384c8bb3b9b359bdfccfc613 (patch) | |
tree | fb473d76db44f96f27eb47ba84443d3361b4ae6a /sqlite3.go | |
parent | Fix #33 and #34 (diff) | |
download | golite-f6d10a2a5851307e384c8bb3b9b359bdfccfc613.tar.gz golite-f6d10a2a5851307e384c8bb3b9b359bdfccfc613.tar.xz |
Convert times to UTC before storage
Diffstat (limited to 'sqlite3.go')
-rw-r--r-- | sqlite3.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -213,7 +213,7 @@ func (s *SQLiteStmt) bind(args []driver.Value) error { } rv = C._sqlite3_bind_blob(s.s, n, unsafe.Pointer(p), C.int(len(v))) case time.Time: - b := []byte(v.Format(SQLiteTimestampFormat)) + b := []byte(v.UTC().Format(SQLiteTimestampFormat)) rv = C._sqlite3_bind_text(s.s, n, (*C.char)(unsafe.Pointer(&b[0])), C.int(len(b))) } if rv != C.SQLITE_OK { |