Title: Saving datetime objects to Datastore - no documentation? · Issue #1200 · googleapis/google-cloud-python · GitHub
Open Graph Title: Saving datetime objects to Datastore - no documentation? · Issue #1200 · googleapis/google-cloud-python
X Title: Saving datetime objects to Datastore - no documentation? · Issue #1200 · googleapis/google-cloud-python
Description: Can the documentation be updated to show the right way to save timestamps to datastore? It took some trial and error to find the right way to do it. Or is this just something obvious that I missed? Example: import time import datetime cl...
Open Graph Description: Can the documentation be updated to show the right way to save timestamps to datastore? It took some trial and error to find the right way to do it. Or is this just something obvious that I missed?...
X Description: Can the documentation be updated to show the right way to save timestamps to datastore? It took some trial and error to find the right way to do it. Or is this just something obvious that I missed?...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/1200
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Saving datetime objects to Datastore - no documentation?","articleBody":"Can the documentation be updated to show the right way to save timestamps to datastore? It took some trial and error to find the right way to do it.\n\nOr is this just something obvious that I missed?\n\nExample:\n\n``` python\nimport time\nimport datetime\nclient = datastore.Client()\n\nentity = datastore.Entity( key = client.key(\"Foo\") )\nentity[\"time\"] = time.gmtime()\nclient.put( entity )\n#does not work\n\nentity = datastore.Entity( key = client.key(\"Foo\") )\nentity[\"time\"] = datetime.datetime.now().date()\nclient.put( entity )\n#does not work\n\nentity = datastore.Entity( key = client.key(\"Foo\") )\nentity[\"time\"] = datetime.datetime.now()\nclient.put( entity )\n#works\n```\n","author":{"url":"https://github.com/thesandlord","@type":"Person","name":"thesandlord"},"datePublished":"2015-10-21T20:27:02Z","url":"https://github.com/googleapis/google-cloud-python/issues/1200"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:246cb170-3958-4e5e-b49a-0aebb1ab0efa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 860E:970F0:3F006E:5936CF:6AFE05AE |
| html-safe-nonce | 581435f5d82deb9897d9bf81690812b39792a4461e1680b652ebadb134cbe8d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjBFOjk3MEYwOjNGMDA2RTo1OTM2Q0Y6NkFGRTA1QUUiLCJ2aXNpdG9yX2lkIjoiNjk2NDU2MTc1MTcxMDc2MjQxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 81d13377f7261f36cae5d558e1a081ed12d62909ebd15377de715370de1ce1ff |
| hovercard-subject-tag | issue:112672224 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/1200/issue_layout |
| twitter:image | https://opengraph.githubassets.com/56a5c0b90bb12e274f40488aca2ec2538900388729f4bbf57d294c2817c8814a/googleapis/google-cloud-python/issues/1200 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/56a5c0b90bb12e274f40488aca2ec2538900388729f4bbf57d294c2817c8814a/googleapis/google-cloud-python/issues/1200 |
| og:image:alt | Can the documentation be updated to show the right way to save timestamps to datastore? It took some trial and error to find the right way to do it. Or is this just something obvious that I missed?... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thesandlord |
| hostname | github.com |
| expected-hostname | github.com |
| None | 86d46ece7c3d9b0562692f81a135cb55ad6a1c82c93ab1ac874d2f1b46b28958 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5c18e6799976b7bc2f21178024289bb98edbcc85 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width