Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dferstay opened this issue Nov 10, 2021 · 0 comments · May be fixed by #138 or #159
Open

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

dferstay opened this issue Nov 10, 2021 · 0 comments · May be fixed by #138 or #159

Comments

@dferstay
Copy link

dferstay commented Nov 10, 2021

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 "."
dferstay pushed a commit to dferstay/dateparse that referenced this issue Nov 10, 2021
Fixes araddon#137

Signed-off-by: Daniel Ferstay <dferstay@splunk.com>
@dferstay dferstay linked a pull request Nov 10, 2021 that will close this issue
@dferstay dferstay reopened this Nov 10, 2021
klondikedragon added a commit to itlightning/dateparse that referenced this issue Dec 12, 2023
* Don't just assume we were given one of the valid formats.
* Also consolidate the parsing states that occur after timePeriod.
* Add subtests to make it easier to see what fails.
* Additional tests for 4-char timezone names.
* Fix araddon#117
* Fix araddon#150
* Fix araddon#157
* Fix araddon#145
* Fix araddon#108
* Fix araddon#137
* Fix araddon#130
* Fix araddon#123
* Fix araddon#109
* Fix araddon#98
* Addresses bug in araddon#100 (comment)

Adds test cases to verify the following are already fixed:
* araddon#94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant