Winamax: Fix reverted(?) timezone update.

This commit is contained in:
Worros 2011-02-28 13:36:23 +08:00
parent c6926b6619
commit 489a8da50a

View File

@ -212,13 +212,11 @@ class Winamax(HandHistoryConverter):
a = self.re_DateTime.search(info[key]) a = self.re_DateTime.search(info[key])
if a: if a:
datetimestr = "%s/%s/%s %s:%s:%s" % (a.group('Y'),a.group('M'), a.group('D'), a.group('H'),a.group('MIN'),a.group('S')) datetimestr = "%s/%s/%s %s:%s:%s" % (a.group('Y'),a.group('M'), a.group('D'), a.group('H'),a.group('MIN'),a.group('S'))
tzoffset = str(-time.timezone/3600)
else: else:
datetimestr = "2010/Jan/01 01:01:01" datetimestr = "2010/Jan/01 01:01:01"
log.error(_("readHandInfo: DATETIME not matched: '%s'" % info[key])) log.error(_("readHandInfo: DATETIME not matched: '%s'" % info[key]))
#print "DEBUG: readHandInfo: DATETIME not matched: '%s'" % info[key] #print "DEBUG: readHandInfo: DATETIME not matched: '%s'" % info[key]
# TODO: Manually adjust time against OFFSET hand.startTime = datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S")
hand.startTime = datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S") # also timezone at end, e.g. " ET"
hand.startTime = HandHistoryConverter.changeTimezone(hand.startTime, "CET", "UTC") hand.startTime = HandHistoryConverter.changeTimezone(hand.startTime, "CET", "UTC")
if key == 'HID1': if key == 'HID1':
# Need to remove non-alphanumerics for MySQL # Need to remove non-alphanumerics for MySQL