You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing 2018-09-30 09:09:09PM EST will produce a correct result (the same as 2018-10-01T01:09:09Z), but 2018-09-30 09:09:09 PM EST will be incorrect (it recognizes the PM but not the time zone -- it produces the time value of 2018-09-30T21:09:09Z).
The text was updated successfully, but these errors were encountered:
It also looks like it doesn't properly recognize time zones like PMDT, PMST, and AMT where the time zone name shares the same prefix as PM/AM. (e.g., 2018-09-30 21:09:09 PMDT or 2018-09-30 21:09:09 PM PMDT or 2018-09-30 21:09:09 PM AMT). It looks like when it hits the first P it goes into the timeWsAMPMMaybe state, but then when it hits the M it thinks that it is definitely an AM/PM. At that point it could potentially 'look ahead' at the next rune and if it isn't the end and it's still an alpha character then assume it's a time zone, etc. https://github.com/araddon/dateparse/blob/master/parseany.go#L1397
This is a very helpful package, thank you!
Parsing
2018-09-30 09:09:09PM EST
will produce a correct result (the same as2018-10-01T01:09:09Z
), but2018-09-30 09:09:09 PM EST
will be incorrect (it recognizes thePM
but not the time zone -- it produces the time value of2018-09-30T21:09:09Z
).The text was updated successfully, but these errors were encountered: