Title: Serving Pages to the Web in CH2 - 2nd ed · Issue #32 · ProgrammingRust/examples · GitHub
Open Graph Title: Serving Pages to the Web in CH2 - 2nd ed · Issue #32 · ProgrammingRust/examples
X Title: Serving Pages to the Web in CH2 - 2nd ed · Issue #32 · ProgrammingRust/examples
Description: Running the code around page 18 gives me the following error: error[E0277]: cannot subtract `chrono::Duration` from `Tm` cookie.set_expires(time::now() - Duration::days(365)); | ^ no implementation for `Tm - chrono::Duration` | = help: t...
Open Graph Description: Running the code around page 18 gives me the following error: error[E0277]: cannot subtract `chrono::Duration` from `Tm` cookie.set_expires(time::now() - Duration::days(365)); | ^ no implementation...
X Description: Running the code around page 18 gives me the following error: error[E0277]: cannot subtract `chrono::Duration` from `Tm` cookie.set_expires(time::now() - Duration::days(365)); | ^ no implementation...
Opengraph URL: https://github.com/ProgrammingRust/examples/issues/32
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Serving Pages to the Web in CH2 - 2nd ed","articleBody":"Running the code around page 18 gives me the following error:\r\n```\r\nerror[E0277]: cannot subtract `chrono::Duration` from `Tm`\r\ncookie.set_expires(time::now() - Duration::days(365));\r\n| ^ no implementation for `Tm - chrono::Duration`\r\n|\r\n= help: the trait `Sub\u003cchrono::Duration>` is not implemented for `Tm`\r\n= help: the following other types implement trait `Sub\u003cRhs>`:\r\n\u003cTm as Sub\u003ctime::Duration>>\r\n\u003cTm as Sub>\r\n```\r\nThe compiler doesn't even reach my code, so it must be an issue with dependencies.\r\nBased on this Reddit post, other people are getting the same error:\r\nhttps://www.reddit.com/r/rust/comments/17djgjd/working_through_programming_rust_2nd_edition_got/\r\n\r\nAdding this dependency fixes the issue:\r\nchrono = { version = \"= 0.4.29\" }","author":{"url":"https://github.com/Slyfox88","@type":"Person","name":"Slyfox88"},"datePublished":"2023-11-05T04:33:30Z","url":"https://github.com/ProgrammingRust/examples/issues/32"}
| 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:71f6e6d8-e55f-9eca-4c1c-f7e69b3377a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB4E:1D20B7:11EF962:16A72C5:6B015551 |
| html-safe-nonce | cbb84f89187ef1533a07525b47a5908445dd6792771e043d1fe2b8acb5150b53 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjRFOjFEMjBCNzoxMUVGOTYyOjE2QTcyQzU6NkIwMTU1NTEiLCJ2aXNpdG9yX2lkIjoiNjM3OTYwMzc0NTkxNDgzNjMwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 044e156b3f5f8c83208269b458be8fb81cfc7f989543ae6e24a5bfe1b03ae81a |
| hovercard-subject-tag | issue:1977628445 |
| 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/ProgrammingRust/examples/32/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8117d67681a8621289ff0709c7f18e0495dc5d380723f533fe7542ee1a7bae1a/ProgrammingRust/examples/issues/32 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8117d67681a8621289ff0709c7f18e0495dc5d380723f533fe7542ee1a7bae1a/ProgrammingRust/examples/issues/32 |
| og:image:alt | Running the code around page 18 gives me the following error: error[E0277]: cannot subtract `chrono::Duration` from `Tm` cookie.set_expires(time::now() - Duration::days(365)); | ^ no implementation... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Slyfox88 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/ProgrammingRust/examples git https://github.com/ProgrammingRust/examples.git |
| octolytics-dimension-user_id | 28735311 |
| octolytics-dimension-user_login | ProgrammingRust |
| octolytics-dimension-repository_id | 112379801 |
| octolytics-dimension-repository_nwo | ProgrammingRust/examples |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 112379801 |
| octolytics-dimension-repository_network_root_nwo | ProgrammingRust/examples |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width