Fixes #13: UTC vs not UTC, I don't know which one is right, but let's pick one!

This commit is contained in:
Chris Sexton 2013-06-01 21:58:20 -04:00
parent be1739d316
commit 8cf2b997a2
1 changed files with 4 additions and 1 deletions

View File

@ -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]