server/sources/__init__.py
branchstable
changeset 7922 d307c3817782
parent 7879 9aae456abab5
child 8134 7f93da785e3a
--- a/server/sources/__init__.py	Fri Oct 07 15:55:14 2011 +0200
+++ b/server/sources/__init__.py	Fri Oct 07 15:55:15 2011 +0200
@@ -65,13 +65,13 @@
         self.ttl = timedelta(seconds=ttl)
 
     def __setitem__(self, key, value):
-        dict.__setitem__(self, key, (datetime.now(), value))
+        dict.__setitem__(self, key, (datetime.utcnow(), value))
 
     def __getitem__(self, key):
         return dict.__getitem__(self, key)[1]
 
     def clear_expired(self):
-        now_ = datetime.now()
+        now_ = datetime.utcnow()
         ttl = self.ttl
         for key, (timestamp, value) in self.items():
             if now_ - timestamp > ttl: