-
-
Notifications
You must be signed in to change notification settings - Fork 106
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 non-standard time format #177
Conversation
I would be included just to remove a trailing |
Hmm yeah that's better. Thanks @ncw . It's updated now. Please have another look. Note: I didn't add a new test case because it's too much trouble to make the test server return time with a trailing |
Hi @ncw Any chance we can get this in? 🙏 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
Let me try the CI
Thank you :-) |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/ncw/swift/v2](https://togithub.com/ncw/swift) | require | patch | `v2.0.1` -> `v2.0.2` | --- ### Release Notes <details> <summary>ncw/swift</summary> ### [`v2.0.2`](https://togithub.com/ncw/swift/releases/tag/v2.0.2) [Compare Source](https://togithub.com/ncw/swift/compare/v2.0.1...v2.0.2) #### What's Changed - Support non-standard time format by [@​joec4i](https://togithub.com/joec4i) in [https://github.com/ncw/swift/pull/177](https://togithub.com/ncw/swift/pull/177) #### New Contributors - [@​joec4i](https://togithub.com/joec4i) made their first contribution in [https://github.com/ncw/swift/pull/177](https://togithub.com/ncw/swift/pull/177) **Full Changelog**: ncw/swift@v2.0.1...v2.0.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on Monday" in timezone Europe/Paris, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/cozy/cozy-stack). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMjYuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEyNi4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
We are working with a Swift backend server that returns
last_modified
formatted as2022-08-18T04:02:34Z
instead of2022-08-18T04:02:34
. Because of that, theObjects()
call returns the following error:As per the OpenStack Storage API reference,
2022-08-18T04:02:34Z
appears to be a valid ISO 8601 format according to wikipedia.The easiest way to support it is probably to make time format a setting that can be changed by the user. This PR does that.This removes the
Z
suffix fromobject.ServerLastModified
before using it.Please review.
Thanks!