René's URL Explorer Experiment


Title: BigQuery python cli fails to change time, BUT does changes timezone for TIMESTAMP which leads to an incorrect time · Issue #476 · googleapis/python-bigquery · GitHub

Open Graph Title: BigQuery python cli fails to change time, BUT does changes timezone for TIMESTAMP which leads to an incorrect time · Issue #476 · googleapis/python-bigquery

X Title: BigQuery python cli fails to change time, BUT does changes timezone for TIMESTAMP which leads to an incorrect time · Issue #476 · googleapis/python-bigquery

Description: This code works with with the python package google-cloud-bigquery==2.2.0 but it does not work with this package google-cloud-bigquery==2.6.0 What you expected to happen: I expect the client library to take a datetime of '2017-11-01 04:0...

Open Graph Description: This code works with with the python package google-cloud-bigquery==2.2.0 but it does not work with this package google-cloud-bigquery==2.6.0 What you expected to happen: I expect the client librar...

X Description: This code works with with the python package google-cloud-bigquery==2.2.0 but it does not work with this package google-cloud-bigquery==2.6.0 What you expected to happen: I expect the client librar...

Opengraph URL: https://github.com/googleapis/python-bigquery/issues/476

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BigQuery python cli fails to change time, BUT does changes timezone for TIMESTAMP which leads to an incorrect time","articleBody":"This code works with with the python package\r\n   **google-cloud-bigquery==2.2.0** \r\nbut it does not work with this package\r\n   **google-cloud-bigquery==2.6.0**\r\n\r\nWhat you expected to happen:\r\n\r\nI expect the client library to take a datetime of\r\n '_2017-11-01 04:08 AM -07:00_'    and convert it to\r\n '_2017-11-01 11:08 AM -00:00_' in big query. but instead it uploads it to\r\n '_2017-11-01 04:08 AM -00:00_'\r\n\r\nSteps to reproduce:\r\n```\r\nimport datetime\r\nfrom dateutil.tz import tzoffset\r\nfrom google.cloud.bigquery import SchemaField, Table\r\n\r\nschema = [SchemaField('c', 'TIMESTAMP', 'NULLABLE', None, (), None)] \r\nproblem_date = datetime.datetime(2017, 11, 1, 4, 8, tzinfo=tzoffset(None, -25200))\r\ntable_name = ‘my_test_table’\r\ndataset = \u003can existing dataset\u003e\r\n\r\nbigquery = bigquery.Client(credentials=\u003csomecreds\u003e, project=\u003courproj\u003e)\r\n\r\ndataset_ref = bigquery.dataset(dataset, project=\u003courproj\u003e)\r\ntable_ref = dataset_ref.table(table_name)\r\ntable = bigquery.create_table(Table(table_ref, schema=schema))\r\nerrors = bigquery.insert_rows(table, [[problem_date]])\r\n```\r\n\r\n#### Other info\r\n-------------------------------\r\nI worked with the google BigQuery team and here is their [feedback](https://issuetracker.google.com/issues/175849093).\r\nHello,\r\n\r\nI have been investigating the issue you described and it seems like this change of behaviour of the python client library was introduced in the version 2.5.0 [1] with the pull request #393 [2], whose objective was to fix a previous issue with floating points and timestamps in the method `insert_rows`.\r\n\r\nI have been able to reproduce your issue in new versions after 2.5.0 while it does not happen in the previous ones. The suggested way to proceed here would be to open an issue in the Github repository [3] so you can transmit your findings to the Engineering Team, since the code is open source .\r\n\r\nAlternatively, you might want to add the following line of code, so the timezone is converted to UTC before trying to insert the row into BigQuery. Please let me know if this workaround worked for you:\r\n```\r\nproblem_date = datetime.datetime(2017, 11, 1, 4, 8, tzinfo=tzoffset(None, -25200))\r\nproblem_date = problem_date.astimezone(datetime.timezone.utc)\r\n```\r\n\r\n[1]:\r\nhttps://github.com/googleapis/python-bigquery/releases/tag/v2.5.0\r\n[2]:\r\nhttps://github.com/googleapis/python-bigquery/pull/393\r\n[3]:\r\nhttps://github.com/googleapis/python-bigquery/issues\r\n\r\n-------------------------------\r\n\r\nWe will look into the feasibility of the workaround\r\n\r\n\r\n","author":{"url":"https://github.com/zsolt-sb","@type":"Person","name":"zsolt-sb"},"datePublished":"2021-01-19T17:18:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/476/python-bigquery/issues/476"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:74e61326-34a8-ee10-301c-32da42e7289f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8918:53234:15D70E9:1DAEFD4:6A4F2402
html-safe-nonce409b21258ef2cdf98db3960154a7bbf3c2a387b72e43788cfc440e5ad4c4fce3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTE4OjUzMjM0OjE1RDcwRTk6MURBRUZENDo2QTRGMjQwMiIsInZpc2l0b3JfaWQiOiI4ODgzNDU5ODkwMzg5NDExODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8c365a36114d7a5e83ccd524777da675546d643e21d7ac9582c48941346afd37
hovercard-subject-tagissue:789208541
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-bigquery/476/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8e86a36c8ab488529e20a17a9e50c4ba44326764e6cf75bf096b64d43e883793/googleapis/python-bigquery/issues/476
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8e86a36c8ab488529e20a17a9e50c4ba44326764e6cf75bf096b64d43e883793/googleapis/python-bigquery/issues/476
og:image:altThis code works with with the python package google-cloud-bigquery==2.2.0 but it does not work with this package google-cloud-bigquery==2.6.0 What you expected to happen: I expect the client librar...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamezsolt-sb
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-bigquery git https://github.com/googleapis/python-bigquery.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id226992475
octolytics-dimension-repository_nwogoogleapis/python-bigquery
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id226992475
octolytics-dimension-repository_network_root_nwogoogleapis/python-bigquery
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/python-bigquery/issues/476#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-bigquery%2Fissues%2F476
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-bigquery%2Fissues%2F476
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-bigquery
Reloadhttps://github.com/googleapis/python-bigquery/issues/476
Reloadhttps://github.com/googleapis/python-bigquery/issues/476
Reloadhttps://github.com/googleapis/python-bigquery/issues/476
Please reload this pagehttps://github.com/googleapis/python-bigquery/issues/476
googleapis https://github.com/googleapis
python-bigqueryhttps://github.com/googleapis/python-bigquery
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fpython-bigquery
Fork 324 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-bigquery
Star 799 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-bigquery
Code https://github.com/googleapis/python-bigquery
Issues 0 https://github.com/googleapis/python-bigquery/issues
Pull requests 0 https://github.com/googleapis/python-bigquery/pulls
Actions https://github.com/googleapis/python-bigquery/actions
Projects https://github.com/googleapis/python-bigquery/projects
Security and quality 0 https://github.com/googleapis/python-bigquery/security
Insights https://github.com/googleapis/python-bigquery/pulse
Code https://github.com/googleapis/python-bigquery
Issues https://github.com/googleapis/python-bigquery/issues
Pull requests https://github.com/googleapis/python-bigquery/pulls
Actions https://github.com/googleapis/python-bigquery/actions
Projects https://github.com/googleapis/python-bigquery/projects
Security and quality https://github.com/googleapis/python-bigquery/security
Insights https://github.com/googleapis/python-bigquery/pulse
#480https://github.com/googleapis/python-bigquery/pull/480
BigQuery python cli fails to change time, BUT does changes timezone for TIMESTAMP which leads to an incorrect timehttps://github.com/googleapis/python-bigquery/issues/476#top
#480https://github.com/googleapis/python-bigquery/pull/480
https://github.com/plamut
api: bigqueryIssues related to the googleapis/python-bigquery API.https://github.com/googleapis/python-bigquery/issues?q=state%3Aopen%20label%3A%22api%3A%20bigquery%22
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.https://github.com/googleapis/python-bigquery/issues?q=state%3Aopen%20label%3A%22priority%3A%20p1%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-bigquery/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/zsolt-sb
zsolt-sbhttps://github.com/zsolt-sb
on Jan 19, 2021https://github.com/googleapis/python-bigquery/issues/476#issue-789208541
feedbackhttps://issuetracker.google.com/issues/175849093
1https://github.com/googleapis/python-bigquery/releases/tag/v2.5.0
#393https://github.com/googleapis/python-bigquery/pull/393
2https://github.com/googleapis/python-bigquery/pull/393
3https://github.com/googleapis/python-bigquery/issues
plamuthttps://github.com/plamut
api: bigqueryIssues related to the googleapis/python-bigquery API.https://github.com/googleapis/python-bigquery/issues?q=state%3Aopen%20label%3A%22api%3A%20bigquery%22
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.https://github.com/googleapis/python-bigquery/issues?q=state%3Aopen%20label%3A%22priority%3A%20p1%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-bigquery/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.