aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'todolist/util.go')
-rw-r--r--todolist/util.go6
1 files changed, 6 insertions, 0 deletions
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())