araddon / dateparse

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

Not finding time for CET with millisecond and time with nanosecond #123

Open sundarv85 opened 3 years ago

sundarv85 commented 3 years ago

Hello,

I'm using

t, err := dateparse.ParseAny(v)

I'm trying the following input, and I'm getting

Parsing: 2017-04-03 22:32:14.322 CET  => 2017-04-03 22:32:14.322 +0000 UTC => failure
Parsing: 2017-04-03 22:32:14 CET  => 2017-04-03 21:32:14 +0000 UTC => success
Parsing: Mon Dec 26 16:22:08 2016  => 2016-12-26 16:22:08 +0000 UTC => success
Parsing: Mon Dec 26 16:15:55.103786 2016  => Error : parsing time "Dec 26 16:15:55.103786 2016": month out of range => failure

The first and the last seems to fail, while the second and third work...

Any thoughts on how to get it working?