From e7776de8f1554b8ff83ace0a10f0c2eb15bb7f09 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 8 Jul 2010 23:30:02 +0800 Subject: [PATCH] Fix startTime change in remaining files --- pyfpdb/AbsoluteToFpdb.py | 2 +- pyfpdb/BetfairToFpdb.py | 2 +- pyfpdb/CarbonToFpdb.py | 2 +- pyfpdb/EverleafToFpdb.py | 2 +- pyfpdb/FulltiltToFpdb.py | 2 +- pyfpdb/OnGameToFpdb.py | 2 +- pyfpdb/PartyPokerToFpdb.py | 2 +- pyfpdb/UltimateBetToFpdb.py | 2 +- pyfpdb/Win2dayToFpdb.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pyfpdb/AbsoluteToFpdb.py b/pyfpdb/AbsoluteToFpdb.py index 03266bc8..cbeaae29 100755 --- a/pyfpdb/AbsoluteToFpdb.py +++ b/pyfpdb/AbsoluteToFpdb.py @@ -177,7 +177,7 @@ or None if we fail to get the info """ # TODO: (1-on-1) does have that info in the game type line if self.HORSEHand: hand.maxseats = 8 - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%Y-%m-%d %H:%M:%S") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%Y-%m-%d %H:%M:%S") return def readPlayerStacks(self, hand): diff --git a/pyfpdb/BetfairToFpdb.py b/pyfpdb/BetfairToFpdb.py index 80fdfb11..2acb6ee9 100755 --- a/pyfpdb/BetfairToFpdb.py +++ b/pyfpdb/BetfairToFpdb.py @@ -105,7 +105,7 @@ class Betfair(HandHistoryConverter): logging.debug("HID %s, Table %s" % (m.group('HID'), m.group('TABLE'))) hand.handid = m.group('HID') hand.tablename = m.group('TABLE') - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%A, %B %d, %H:%M:%S GMT %Y") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%A, %B %d, %H:%M:%S GMT %Y") #hand.buttonpos = int(m.group('BUTTON')) def readPlayerStacks(self, hand): diff --git a/pyfpdb/CarbonToFpdb.py b/pyfpdb/CarbonToFpdb.py index 32ad2ef8..317fec80 100644 --- a/pyfpdb/CarbonToFpdb.py +++ b/pyfpdb/CarbonToFpdb.py @@ -156,7 +156,7 @@ or None if we fail to get the info """ hand.handid = m.group('HID1') + m.group('HID2') hand.tablename = m.group('TABLE')[:-1] hand.maxseats = 2 # This value may be increased as necessary - hand.starttime = datetime.datetime.strptime(m.group('DATETIME')[:12], + hand.startTime = datetime.datetime.strptime(m.group('DATETIME')[:12], '%Y%m%d%H%M') # Check that the hand is complete up to the awarding of the pot; if # not, the hand is unparseable diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index ee6b3601..7919a718 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -154,7 +154,7 @@ or None if we fail to get the info """ # 2008/11/10 3:58:52 ET #TODO: Do conversion from GMT to ET #TODO: Need some date functions to convert to different timezones (Date::Manip for perl rocked for this) - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%Y/%m/%d - %H:%M:%S") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%Y/%m/%d - %H:%M:%S") return def readPlayerStacks(self, hand): diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 9b287edc..0c6faf43 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -201,7 +201,7 @@ class Fulltilt(HandHistoryConverter): return None hand.handid = m.group('HID') hand.tablename = m.group('TABLE') - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M:%S ET - %Y/%m/%d") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M:%S ET - %Y/%m/%d") if m.group("CANCELLED") or m.group("PARTIAL"): raise FpdbParseError(hid=m.group('HID')) diff --git a/pyfpdb/OnGameToFpdb.py b/pyfpdb/OnGameToFpdb.py index c560790d..1d6fef1a 100755 --- a/pyfpdb/OnGameToFpdb.py +++ b/pyfpdb/OnGameToFpdb.py @@ -138,7 +138,7 @@ class OnGame(HandHistoryConverter): #TODO: Do conversion from GMT to ET #TODO: Need some date functions to convert to different timezones (Date::Manip for perl rocked for this) - hand.starttime = time.strptime(m.group('DATETIME'), "%d %b %Y %I:%M %p") + hand.startTime = time.strptime(m.group('DATETIME'), "%d %b %Y %I:%M %p") #hand.starttime = "%d/%02d/%02d %d:%02d:%02d ET" %(int(m.group('YEAR')), int(m.group('MON')), int(m.group('DAY')), #int(m.group('HR')), int(m.group('MIN')), int(m.group('SEC'))) diff --git a/pyfpdb/PartyPokerToFpdb.py b/pyfpdb/PartyPokerToFpdb.py index 1f804d2a..07a43f22 100755 --- a/pyfpdb/PartyPokerToFpdb.py +++ b/pyfpdb/PartyPokerToFpdb.py @@ -281,7 +281,7 @@ class PartyPoker(HandHistoryConverter): 'July','August','September','October','November','December'] month = months.index(m2.group('M')) + 1 datetimestr = "%s/%s/%s %s:%s:%s" % (m2.group('Y'), month,m2.group('D'),m2.group('H'),m2.group('MIN'),m2.group('S')) - hand.starttime = datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S") + hand.startTime = datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S") # FIXME: some timezone correction required #tzShift = defaultdict(lambda:0, {'EDT': -5, 'EST': -6, 'MSKS': 3}) #hand.starttime -= datetime.timedelta(hours=tzShift[m2.group('TZ')]) diff --git a/pyfpdb/UltimateBetToFpdb.py b/pyfpdb/UltimateBetToFpdb.py index 1795ac87..15655ecc 100755 --- a/pyfpdb/UltimateBetToFpdb.py +++ b/pyfpdb/UltimateBetToFpdb.py @@ -128,7 +128,7 @@ follow : whether to tail -f the input""" #2008/09/07 06:23:14 ET m2 = re.search("(?P[0-9]{4})\/(?P[0-9]{2})\/(?P[0-9]{2})[\- ]+(?P[0-9]+):(?P[0-9]+):(?P[0-9]+)", info[key]) datetime = "%s/%s/%s %s:%s:%s" % (m2.group('Y'), m2.group('M'),m2.group('D'),m2.group('H'),m2.group('MIN'),m2.group('S')) - hand.starttime = time.strptime(datetime, "%Y/%m/%d %H:%M:%S") + hand.startTime = time.strptime(datetime, "%Y/%m/%d %H:%M:%S") if key == 'HID': hand.handid = info[key] if key == 'TABLE': diff --git a/pyfpdb/Win2dayToFpdb.py b/pyfpdb/Win2dayToFpdb.py index 9a1d40eb..7e76adef 100755 --- a/pyfpdb/Win2dayToFpdb.py +++ b/pyfpdb/Win2dayToFpdb.py @@ -137,7 +137,7 @@ class Win2day(HandHistoryConverter): for key in info: if key == 'DATETIME': # Win2day uses UTC timestamp - hand.starttime = datetime.datetime.fromtimestamp(int(info[key])) + hand.startTime = datetime.datetime.fromtimestamp(int(info[key])) if key == 'HID': hand.handid = info[key] if key == 'TABLE':