GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: correctly decode times without microseconds by tritone · Pull Request #375 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Conversation

@tritone

@tritone tritone commented Feb 9, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 9, 2021
@product-auto-label product-auto-label Bot added the api: storage Issues related to the googleapis/python-storage API. label Feb 9, 2021
@tritone
fix: correctly decode times without microseconds
d2e1fc6
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
@tritone
tritone force-pushed the customtime-micros branch from 0de2a21 to d2e1fc6 Compare February 9, 2021 15:07
@tritone tritone changed the title fix: custom_time decoding without microseconds fix: correctly decode times without microseconds Feb 9, 2021
@tritone
tritone marked this pull request as ready for review February 9, 2021 15:20
@tritone
tritone requested a review from a team February 9, 2021 15:20
@frankyn
Merge branch 'master' into customtime-micros
5e1791d
@frankyn
frankyn requested a review from a team February 9, 2021 20:34
frankyn
frankyn approved these changes Feb 9, 2021
View reviewed changes
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 9, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 9, 2021
@tseaver

tseaver commented Feb 9, 2021

Copy link
Copy Markdown
Contributor

@tritone, @frankyn Seems like we need one or more unit test which assert this change in behavior?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@frankyn

frankyn commented Feb 9, 2021

Copy link
Copy Markdown
Contributor

Thanks @tseaver. Did we miss a coverage check?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tritone
Merge branch 'master' into customtime-micros
20c67d2
@tritone

tritone commented Feb 9, 2021

Copy link
Copy Markdown
Contributor Author

@tritone, @frankyn Seems like we need one or more unit test which assert this change in behavior?

The system test does cover the case that was failing before and ensures that we're correctly parsing the timestamp that GCS returns. I haven't dug into how this code is unit tested currently but I can look into it if you think it would help.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

frankyn and others added 2 commits February 9, 2021 13:12
@frankyn
Merge branch 'master' into customtime-micros
5e42636
@andrewsg
Merge branch 'master' into customtime-micros
00d4d31
@andrewsg andrewsg added the automerge Merge the pull request once unit tests and other checks pass. label Feb 10, 2021
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit 37a1eb5 into googleapis:master Feb 10, 2021
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 10, 2021
This was referenced Mar 11, 2021
build(deps): bump google-cloud-storage from 1.35.0 to 1.36.2 exesse/mongodump-s3#58
Closed
Bump google-cloud-storage from 1.35.0 to 1.36.2 in /requirements allan-silva/balrog#58
Closed
build(deps): bump google-cloud-storage from 1.35.0 to 1.36.2 in /bot mozilla/code-coverage#829
Merged
build(deps): bump google-cloud-storage from 1.35.0 to 1.36.2 in /backend mozilla/code-coverage#830
Merged
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@tritone @cojenco
fix: correctly decode times without microseconds (googleapis#375)
08ec091
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
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@tritone @cojenco
fix: correctly decode times without microseconds (googleapis#375)
bd6f5e1
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
@release-please release-please Bot mentioned this pull request Jan 12, 2022
chore(main): release 3.0.0 #688
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@frankyn frankyn frankyn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: storage Issues related to the googleapis/python-storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Accessing blob.custom_time errors on 0 microsecond timestamp

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@tritone @tseaver @frankyn @andrewsg @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.