]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/models.py
Add pagination to player_captimes & map_captimes; convert SQL queries to SQLalchemy
[xonotic/xonstat.git] / xonstat / models.py
index 0d469e1191652e260a1d22ea8ca23f6597eaaa83..a8be3241fe11849b5851fb37f381466dc58f10b1 100644 (file)
@@ -267,6 +267,12 @@ class PlayerCaptime(object):
     def __repr__(self):
         return "<PlayerCaptime(pid=%s, map_id=%s)>" % (self.player_id, self.map_id)
 
+    def fuzzy_date(self):
+        return pretty_date(self.create_dt)
+
+    def epoch(self):
+        return timegm(self.create_dt.timetuple())
+
 
 class SummaryStat(object):
     def __repr__(self):