diff --git a/wanikaniburned.py b/wanikaniburned.py index 13ebb10..ba6ad7d 100644 --- a/wanikaniburned.py +++ b/wanikaniburned.py @@ -93,12 +93,11 @@ class User(db.Model): self.vocabulary = json.dumps(items) def update_all(self): - if (datetime.now() - self.last_updated) > timedelta(hours=1): + if (datetime.utcnow() - self.last_updated) > timedelta(hours=1): self.parse_radicals_and_userdata() self.parse_kanji() self.parse_vocabulary() self.last_updated = datetime.utcnow() - db.session.add(self) db.session.commit() else: raise ValueError('Cannot refresh now, try again later.')