Title: Missing microseconds in Time difference · Issue #584 · python-pendulum/pendulum · GitHub
Open Graph Title: Missing microseconds in Time difference · Issue #584 · python-pendulum/pendulum
X Title: Missing microseconds in Time difference · Issue #584 · python-pendulum/pendulum
Description: https://github.com/sdispater/pendulum/blob/8012a7e8600c2348f1978eebb22fdd2535a8cca9/pendulum/time.py#L212-L218 I believe that self.microsecond and dt.microsecond are being ignored when calculating the difference. Maybe it should be somet...
Open Graph Description: https://github.com/sdispater/pendulum/blob/8012a7e8600c2348f1978eebb22fdd2535a8cca9/pendulum/time.py#L212-L218 I believe that self.microsecond and dt.microsecond are being ignored when calculating ...
X Description: https://github.com/sdispater/pendulum/blob/8012a7e8600c2348f1978eebb22fdd2535a8cca9/pendulum/time.py#L212-L218 I believe that self.microsecond and dt.microsecond are being ignored when calculating ...
Opengraph URL: https://github.com/python-pendulum/pendulum/issues/584
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing microseconds in Time difference","articleBody":"https://github.com/sdispater/pendulum/blob/8012a7e8600c2348f1978eebb22fdd2535a8cca9/pendulum/time.py#L212-L218\r\n\r\nI believe that `self.microsecond` and `dt.microsecond` are being ignored when calculating the difference.\r\n\r\nMaybe it should be something like:\r\n```py\r\n us1 = (\r\n self.hour * SECS_PER_HOUR + self.minute * SECS_PER_MIN + self.second\r\n ) * USECS_PER_SEC + self.microsecond\r\n \r\n us2 = (\r\n dt.hour * SECS_PER_HOUR + dt.minute * SECS_PER_MIN + dt.second\r\n ) * USECS_PER_SEC + dt.microsecond\r\n```\r\n\r\nAlso, it does seem to me like this could go on its own method:\r\n\r\n```py\r\ndef microsecond_total(self) -> int:\r\n return (\r\n self.hour * SECS_PER_HOUR + self.minute * SECS_PER_MIN + self.second\r\n ) * USECS_PER_SEC + self.microsecond","author":{"url":"https://github.com/MicaelJarniac","@type":"Person","name":"MicaelJarniac"},"datePublished":"2021-11-27T01:52:42Z","url":"https://github.com/python-pendulum/pendulum/issues/584"}
| 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:f22ba073-eadf-d696-bfe6-e95211d69222 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9568:19B98B:F8BF7:16328C:6B046486 |
| html-safe-nonce | 1ac25727d11dd9c7c958cce980d2e0d65d43b804cc1ecad76a4fded62baa387e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTY4OjE5Qjk4QjpGOEJGNzoxNjMyOEM6NkIwNDY0ODYiLCJ2aXNpdG9yX2lkIjoiODkxMzcxNjcwNzc2ODY4OTc5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c8ed15b5bdb8ddf66e0d6de0aab4723d2b5672a9a0f67589583296ac0e7d2b46 |
| hovercard-subject-tag | issue:1064878581 |
| 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/python-pendulum/pendulum/584/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b80cd8afe9331d2dd1cccb5c01d1f27d535feb96439b012cda6de5a6177f183a/python-pendulum/pendulum/issues/584 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b80cd8afe9331d2dd1cccb5c01d1f27d535feb96439b012cda6de5a6177f183a/python-pendulum/pendulum/issues/584 |
| og:image:alt | https://github.com/sdispater/pendulum/blob/8012a7e8600c2348f1978eebb22fdd2535a8cca9/pendulum/time.py#L212-L218 I believe that self.microsecond and dt.microsecond are being ignored when calculating ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MicaelJarniac |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-pendulum/pendulum git https://github.com/python-pendulum/pendulum.git |
| octolytics-dimension-user_id | 191041900 |
| octolytics-dimension-user_login | python-pendulum |
| octolytics-dimension-repository_id | 62095504 |
| octolytics-dimension-repository_nwo | python-pendulum/pendulum |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 62095504 |
| octolytics-dimension-repository_network_root_nwo | python-pendulum/pendulum |
| 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 | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width