araddon / dateparse

GoLang Parse many date strings without knowing format in advance.
MIT License
2.03k stars 164 forks source link

[BUG] not work for small unix timestamp like 57600000 #153

Open QTrouble opened 1 year ago

QTrouble commented 1 year ago

when i want to transfer a small unix timestamp 57600000 to time,it throws an exception “month out of range”. I read code and find the reason, the dateparse thinks 57600000 as a yyyymmdd string, and the "mm" is 00, so it throws “month out of range”, and when i use 57600101 ,it parse the time to 5760-01-01 00:00:00.

image