Add timestamp format parameter for sqlite.
This commit is contained in:
parent
c967a03257
commit
872adad879
2
main.go
2
main.go
@ -47,7 +47,7 @@ type Server struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewServer(dbFile string) (*Server, error) {
|
func NewServer(dbFile string) (*Server, error) {
|
||||||
db, err := sql.Open("sqlite", dbFile)
|
db, err := sql.Open("sqlite", dbFile+"?_time_format=sqlite")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to open db %q: %w", dbFile, err)
|
return nil, fmt.Errorf("unable to open db %q: %w", dbFile, err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user