From 8badae37312c70bc9ae68c7c6c0792033fb0dbd1 Mon Sep 17 00:00:00 2001 From: Ingo Richter Date: Sat, 8 Apr 2017 18:58:45 -0700 Subject: fix build error with older go version --- todolist/util.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'todolist/util.go') diff --git a/todolist/util.go b/todolist/util.go index b87ed03..34f9dd1 100644 --- a/todolist/util.go +++ b/todolist/util.go @@ -32,6 +32,12 @@ func AddTodoIfNotThere(arr []*Todo, item *Todo) []*Todo { func bod(t time.Time) time.Time { year, month, day := t.Date() + + return time.Date(year, month, day, 0, 0, 0, 0, t.Location()) +} + +func timestamp(t time.Time) time.Time { + year, month, day := t.Date() hour, min, sec := t.Clock() return time.Date(year, month, day, hour, min, sec, 0, t.Location()) -- cgit v1.3