From 8cf2b997a2cfe7e08bfe9f813b309d0c1b86fef9 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sat, 1 Jun 2013 21:58:20 -0400 Subject: [PATCH] Fixes #13: UTC vs not UTC, I don't know which one is right, but let's pick one! --- plugins/first.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/first.go b/plugins/first.go index 9520ccf..5b3158d 100644 --- a/plugins/first.go +++ b/plugins/first.go @@ -29,9 +29,12 @@ type FirstEntry struct { func NewFirstPlugin(b *bot.Bot) *FirstPlugin { coll := b.Db.C("first") var firsts []FirstEntry - query := bson.M{"day": midnight(time.Now().UTC())} + query := bson.M{"day": midnight(time.Now())} + log.Println("Day:", midnight(time.Now())) coll.Find(query).All(&firsts) + log.Println("FIRSTS:", firsts) + var first *FirstEntry if len(firsts) > 0 { first = &firsts[0]