araddon / dateparse

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

Support ":" as separator for fractional seconds in the absence of a zone offset #137

Open dferstay opened 2 years ago

dferstay commented 2 years ago

In #117 support was added to parse timestamps of the form:

"2012-08-17T18:31:59:257+0100"

However, parsing timestamps that use ":" as a separator but do not have a time zone offset fails. Attempts to parse the following:

"2012-08-17T18:31:59:257"

Fail with:

parsing time "2012-08-17T18:31:59.257" as "2006-01-02T15:04:05.257": cannot parse "" as "."