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

handle time offset without colon #66

Merged
merged 1 commit into from Oct 9, 2020
Merged

handle time offset without colon #66

merged 1 commit into from Oct 9, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jul 16, 2020

Was using go-swagger and was having issues with a server I don't control sending back a time string like 2020-07-16T20:10:54.570+0000

I was getting an error from parsing time "2020-07-16T19:13:38.908+0000": extra text: :38.908+0000

This seems to fix that. Not super familiar with this codebase, just took a jab and added some tests where it felt correct. Let me know if there's any adjustments you'd like to see or concerns.

Signed-off-by: Anthony Ronning <[email protected]>
@archer-v
Copy link

archer-v commented Oct 9, 2020

A lot of services written in Java represent dates in ISO-8601 format, where a time zone can be represented in format ....mm:ss.ssss+0000. Data-model which is built by go-swagger can't work with these dates without crutches. Also, Facebook use dates in this format too.
It's an actual issue and this commit should fix it. It contains just a few lines with obvious changes but somehow is still on a review stage

@ghost
Copy link
Author

ghost commented Oct 9, 2020

Not sure, just running a fork myself. Maintainer acts like it's up to us to not use services that display a different type of timezone with no way of proving an alternative format. #65 (comment)

@casualjim casualjim merged commit 16ebb99 into go-openapi:master Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants