# HG changeset patch # User Sylvain Thénault # Date 1306427095 -7200 # Node ID 9bb8f89fd31ca015330125e8b5ea1fd487aa85df # Parent aee55fb4633c9a8891a9412983ed7f6115ae8736# Parent c10164464afc0775806b5be7852b5dbc4f98ec59 backport stable diff -r aee55fb4633c -r 9bb8f89fd31c server/sources/datafeed.py --- a/server/sources/datafeed.py Thu May 26 08:57:15 2011 +0200 +++ b/server/sources/datafeed.py Thu May 26 18:24:55 2011 +0200 @@ -124,7 +124,7 @@ def fresh(self): if self.latest_retrieval is None: return False - return datetime.now() < (self.latest_retrieval + self.synchro_interval) + return datetime.utcnow() < (self.latest_retrieval + self.synchro_interval) def pull_data(self, session, force=False, raise_on_error=False): if not force and self.fresh(): @@ -156,7 +156,7 @@ for etype, eids in byetype.iteritems(): session.execute('DELETE %s X WHERE X eid IN (%s)' % (etype, ','.join(eids))) - self.latest_retrieval = datetime.now() + self.latest_retrieval = datetime.utcnow() session.execute('SET X latest_retrieval %(date)s WHERE X eid %(x)s', {'x': self.eid, 'date': self.latest_retrieval}) return parser.stats