rconroy293 / mtga-log-client

GNU General Public License v3.0
61 stars 26 forks source link

Script does not work in Windows #47

Open kelesi opened 4 years ago

kelesi commented 4 years ago

This code fails in Windows:

self.cur_log_time = datetime.datetime.fromtimestamp(0)
self.last_utc_time = datetime.datetime.fromtimestamp(0)

with

Traceback (most recent call last):
  File "mtga_follower.py", line 833, in <module>
    follower = Follower(token, host=args.host)
  File "mtga_follower.py", line 154, in __init__
    self.cur_log_time = datetime.datetime.fromtimestamp(0)
OSError: [Errno 22] Invalid argument

It seems like the lowest value that fromtimestamp() function can take on Windows is 86400.