mirror of https://github.com/velour/catbase.git
Fixes #13: UTC vs not UTC, I don't know which one is right, but let's pick one!
This commit is contained in:
parent
be1739d316
commit
8cf2b997a2
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue