Closed joec4i closed 1 year ago
I would be included just to remove a trailing Z
if it exists - then the code will adapt to either format with no configuration.
I would be included just to remove a trailing
Z
if it exists - then the code will adapt to either format with no configuration.
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 Z
. The existing test TestObjects()
should still pass though.
Hi @ncw Any chance we can get this in? 🙏 🙏
Thank you :-)
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!