]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Use utcnow() as the basis for calculating fuzzy date strings.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 21 Apr 2012 14:22:57 +0000 (10:22 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 21 Apr 2012 14:22:57 +0000 (10:22 -0400)
xonstat/util.py

index 92ab448e1616f57a9a247fdb2cfb316564058c9a..1bea47c94d8100e3047464dc6601657d010d9de3 100755 (executable)
@@ -118,7 +118,7 @@ def pretty_date(time=False):
     pretty string like 'an hour ago', 'Yesterday', '3 months ago',
     'just now', etc
     """
-    now = datetime.now()
+    now = datetime.utcnow()
     if type(time) is int:
         diff = now - datetime.fromtimestamp(time)
     elif isinstance(time,datetime):