From c2d3f359627f9b65bb7f7dc95c6f677b2d9c937c Mon Sep 17 00:00:00 2001 From: NatureFreshMilk Date: Thu, 4 Apr 2019 08:12:06 +0200 Subject: [PATCH] use float64 for psql timestamp --- server/db/postgres/postgres.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/db/postgres/postgres.go b/server/db/postgres/postgres.go index 0066f36..cf8f7c3 100644 --- a/server/db/postgres/postgres.go +++ b/server/db/postgres/postgres.go @@ -100,14 +100,14 @@ func (db *PostgresAccessor) GetTimestamp() (int64, error) { defer rows.Close() if rows.Next() { - var ts int64 + var ts float64 err = rows.Scan(&ts) if err != nil { return 0, err } - return ts, nil + return int64(ts), nil } return 0, nil