import math
import sqlalchemy
import sqlalchemy.sql.functions as sfunc
+from calendar import timegm
from datetime import timedelta
from sqlalchemy.orm import mapper
from sqlalchemy.orm import scoped_session
def fuzzy_date(self):
return pretty_date(self.create_dt)
+ def epoch(self):
+ return timegm(self.create_dt.timetuple())
+
class Map(object):
def __init__(self, name=None):
def fuzzy_date(self):
return pretty_date(self.create_dt)
+ def epoch(self):
+ return timegm(self.create_dt.timetuple())
+
+
class Game(object):
def __init__(self, game_id=None, start_dt=None, game_type_cd=None,
server_id=None, map_id=None, winner=None):
def fuzzy_date(self):
return pretty_date(self.start_dt)
+ def epoch(self):
+ return timegm(self.start_dt.timetuple())
+
class PlayerGameStat(object):
def __init__(self, player_game_stat_id=None, create_dt=None):