Title: Signed reference expiration time is measured in seconds since epoch · Issue #107 · googleapis/google-cloud-java · GitHub
Open Graph Title: Signed reference expiration time is measured in seconds since epoch · Issue #107 · googleapis/google-cloud-java
X Title: Signed reference expiration time is measured in seconds since epoch · Issue #107 · googleapis/google-cloud-java
Description: Java measures time in milliseconds from the epoch not seconds and using this as a base would be simpler. The example: Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); long expiration = cal.getTimeInMillis() / 1000; stora...
Open Graph Description: Java measures time in milliseconds from the epoch not seconds and using this as a base would be simpler. The example: Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); long expirati...
X Description: Java measures time in milliseconds from the epoch not seconds and using this as a base would be simpler. The example: Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); long expirati...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/107
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Signed reference expiration time is measured in seconds since epoch","articleBody":"Java measures time in milliseconds from the epoch not seconds and using this as a base would be simpler. The example:\n\n``` java\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.DATE, 1);\n long expiration = cal.getTimeInMillis() / 1000;\n storage.signUrl(blobInfo, expiration));\n```\n\nwould become:\n\n``` java\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.DATE, 1);\n storage.signUrl(blobInfo, cal.getTime()));\n```\n\nHowever, given this is actually just performing an interval calculation we could also support:\n\n``` java\n storage.signUrl(blobInfo, 1, TimeUnit.DAYS);\n```\n\nIdeally we would also support the time classes added in Java 8:\n\n``` java\n storage.signUrl(blobInfo, Instant.now().plus(24, ChronoUnit.HOURS));\n storage.signUrl(blobInfo, Duration.ofDays(1));\n```\n","author":{"url":"https://github.com/jboynes","@type":"Person","name":"jboynes"},"datePublished":"2015-06-10T01:45:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/107/google-cloud-java/issues/107"}
| 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:30ae1140-26bd-61ca-20ca-27ced5bfa2d3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8756:2C0E24:1236B0C:18B0E49:6A4D6B6C |
| html-safe-nonce | 40cfa41defe47786f26c331d1fb7941dc9318524a8eb67b258e742691589f18e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzU2OjJDMEUyNDoxMjM2QjBDOjE4QjBFNDk6NkE0RDZCNkMiLCJ2aXNpdG9yX2lkIjoiMzQ3NjQxMjk0NzQxMTM4Mjg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3aa29e417887414bc2dd96b6a54dd6be44a6644c8931dc6e5b7674679b009dcb |
| hovercard-subject-tag | issue:86798027 |
| 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-java/107/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd32b4130fb8bcb3aaaa891c62e33e67ce4eb8b9b5e286ef480c5fa18cede098/googleapis/google-cloud-java/issues/107 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd32b4130fb8bcb3aaaa891c62e33e67ce4eb8b9b5e286ef480c5fa18cede098/googleapis/google-cloud-java/issues/107 |
| og:image:alt | Java measures time in milliseconds from the epoch not seconds and using this as a base would be simpler. The example: Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); long expirati... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jboynes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| 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 | cd8f6a71db61d6012a0cbb134be844fdbe9b8a45 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width