chubin / pyphoon

:waning_gibbous_moon: ASCII Art Phase of the Moon (Python version)

Home Page:http://wttr.in/Moon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pyphoon on windows cannot parse dates

kungfubeaner opened this issue · comments

commented

I installed pyphoon on Arch Linux and on windows. On it works properly but on windows:

pyphoon 1960-04-02

says cannot parse date, but strangely later dates like 1980-10-31 or 1993-10-31 work fine.
I'm guessing its an issue with python-dateutils on windows.

commented

Tried to do some debugging on my own and this is where the issue happens:

Line 267 in init.py:

dateobj = time.mktime(dateutil.parser.parse("04/02/1960").timetuple())

Traceback (most recent call last):
File "", line 1, in
OverflowError: mktime argument out of range

It seems any date before the epoch is invalid. "01/01/1970"