dateparse icon indicating copy to clipboard operation
dateparse copied to clipboard

Cannot parse "Jan 20 21:17:01"

Open jftuga opened this issue 6 years ago • 4 comments

Fatal Error: parsing time "Jan 20 21:17:01": month out of range

This format is used in Debian's auth.log

Could you please add this format?

jftuga avatar Jan 24 '19 18:01 jftuga

So if i am reading this correctly, there is no year in this, we just assume current year?

araddon avatar Jan 24 '19 18:01 araddon

Yes, assume current year.

jftuga avatar Jan 24 '19 19:01 jftuga

I am struggling to decide if i want to support this format. It seems to have some magic "assume this year" given it is prone to be wrong by the time it gets parsed. I have a pr that fulfills it but am leaning against it at the moment. https://github.com/araddon/dateparse/pull/80

araddon avatar Jan 25 '19 18:01 araddon

Yes, upon further thought, I think that is the right choice. The only other suggestion I can think of is to somehow make it optional.

jftuga avatar Jan 26 '19 12:01 jftuga