This commit is contained in:
Stash Dev
2019-02-14 15:42:52 -08:00
parent 1d00b2b36f
commit b488c1ed7d
111 changed files with 141 additions and 141 deletions

View File

@@ -0,0 +1,21 @@
package models
import (
"database/sql/driver"
"time"
)
type SQLiteTimestamp struct {
Timestamp time.Time
}
// Scan implements the Scanner interface.
func (t *SQLiteTimestamp) Scan(value interface{}) error {
t.Timestamp = value.(time.Time)
return nil
}
// Value implements the driver Valuer interface.
func (t SQLiteTimestamp) Value() (driver.Value, error) {
return t.Timestamp.Format(time.RFC3339), nil
}