GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Accessing blob.custom_time errors on 0 microsecond timestamp · Issue #363 · googleapis/python-storage
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Accessing blob.custom_time errors on 0 microsecond timestamp #363Copy link Copy link Closed Labels api: storageIssues related to the googleapis/python-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. DescriptionEnvironment details
Steps to reproduce
Code exampleblob = Blob(mybucket, objectname) blob.reload() blob.custom_time = datetime(year=2000, month = 1, day = 13, hour = 13, minute = 1, second = 0, microsecond = 0) blob.patch() blob.reload() blob.custom_time Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 3773, in custom_time return _rfc3339_to_datetime(value)_rfc3339_to_datetime File "/usr/local/lib/python3.7/site-packages/google/cloud/_helpers.py", line 286, in _rfc3339_to_datetime return datetime.datetime.strptime(dt_str, _RFC3339_MICROS).replace(tzinfo=UTC) File "/usr/local/lib/python3.7/_strptime.py", line 577, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/usr/local/lib/python3.7/_strptime.py", line 359, in _strptime (data_string, format)) ValueError("time data '2000-01-13T13:01:00Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'") As compared to a working example: blob.custom_time = datetime(year=2000, month = 1, day = 13, hour = 14, minute = 2, second = 0, microsecond = 10) blob.patch() blob.reload() blob.custom_time datetime.datetime(2000, 1, 13, 14, 2, 0, 10, tzinfo=<UTC>) Stack traceReacted by oittaa Activity
MetadataMetadataAssigneesLabelsapi: storageIssues related to the googleapis/python-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |