2014-05-08, 17:19
Hi, great add-on. I use it every gameday. I've noticed in the last few weeks that the game times listed for upcoming games have been off by an hour. Looking at the schedule from http://mobile.cdn.mlssoccer.com/iphone/v...4-05-05.js (for example), it seems there's now a non-zero time-zone offset (maybe for DST?) in gameDateTime, such as 20140507T190000+0100.
getGameDateTimeStr assumes the offset is always zero. I hacked in a modification after the strptime call:
tz_offset_str = time_parts[1]
tz_offset = int(tz_offset_str[:2]) * 3600 + int(tz_offset_str[-2:]) * 60
game_dt = datetime.datetime.fromtimestamp(time.mktime(game_t) - tz_offset)
It's a bit ugly, but it seems to fix it without creating any other problems - as long as they don't start using negative offsets.
getGameDateTimeStr assumes the offset is always zero. I hacked in a modification after the strptime call:
tz_offset_str = time_parts[1]
tz_offset = int(tz_offset_str[:2]) * 3600 + int(tz_offset_str[-2:]) * 60
game_dt = datetime.datetime.fromtimestamp(time.mktime(game_t) - tz_offset)
It's a bit ugly, but it seems to fix it without creating any other problems - as long as they don't start using negative offsets.