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
Accessing blob.custom_time errors on 0 microsecond timestamp #363
Comments
Hi @rconnaughton, Thank you for filing this issue. I was able to reproduce it and looks like Cloud Storage returns no fractional microsecond when it's 0 even though the format described in documentation is The issue with the client is that it always expects the returned value to include microseconds. I'm following up with the backend team to understand if this is the expectation. I'll loop back when I learn more. Thank you for your patience! |
This is a bug in the library. The Storage backend team stated that when milliseconds is 0 the 0 is not returned. I'll work on a fix this week. It will require two PRs based on my current understanding, there might be a better solution though and will research / update:
|
Currently custom_time is not being decoded correctly if the value has a zero in the microseconds field. This fixes the issue by using a different helper method to decode. Fixes googleapis#363
Currently custom_time is not being decoded correctly if the value has a zero in the microseconds field. This fixes the issue for custom_time as well as elsewhere by replacing _datetime_to_rfc3339 with _rfc3339_nanos_to_datetime. Fixes googleapis#363
Currently custom_time is not being decoded correctly if the value has a zero in the microseconds field. This fixes the issue for custom_time as well as elsewhere by replacing _datetime_to_rfc3339 with _rfc3339_nanos_to_datetime. Fixes #363
Currently custom_time is not being decoded correctly if the value has a zero in the microseconds field. This fixes the issue for custom_time as well as elsewhere by replacing _datetime_to_rfc3339 with _rfc3339_nanos_to_datetime. Fixes googleapis#363
Currently custom_time is not being decoded correctly if the value has a zero in the microseconds field. This fixes the issue for custom_time as well as elsewhere by replacing _datetime_to_rfc3339 with _rfc3339_nanos_to_datetime. Fixes googleapis#363
Environment details
google-cloud-storage
version: 1.34.0Steps to reproduce
custom_time
field to a datetime object with 0 microsecondscustom_time
field and observe the value errorCode example
As compared to a working example:
Stack trace
The text was updated successfully, but these errors were encountered: