Title: Rounding error · Issue #1 · mt/oadate-java · GitHub
Open Graph Title: Rounding error · Issue #1 · mt/oadate-java
X Title: Rounding error · Issue #1 · mt/oadate-java
Description: I added the following test to OleAutomationDateUtilTest assertThat("Day 2015" , oadu.fromOADate(42095.99407407407, GMT) , equalTo(d("Apr 1, 2015 11:51:27 pm GMT"))); and I get the following error java.lang.AssertionError: Day 2015 Expect...
Open Graph Description: I added the following test to OleAutomationDateUtilTest assertThat("Day 2015" , oadu.fromOADate(42095.99407407407, GMT) , equalTo(d("Apr 1, 2015 11:51:27 pm GMT"))); and I get the following error j...
X Description: I added the following test to OleAutomationDateUtilTest assertThat("Day 2015" , oadu.fromOADate(42095.99407407407, GMT) , equalTo(d("Apr 1, 2015 11:51:27 pm GMT"))); and I get t...
Opengraph URL: https://github.com/mt/oadate-java/issues/1
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rounding error","articleBody":"I added the following test to OleAutomationDateUtilTest\n\n``` Java\n assertThat(\"Day 2015\"\n , oadu.fromOADate(42095.99407407407, GMT)\n , equalTo(d(\"Apr 1, 2015 11:51:27 pm GMT\")));\n```\n\nand I get the following error\n\n```\njava.lang.AssertionError: Day 2015\nExpected: \u003cThu Apr 02 01:51:27 CEST 2015\u003e\n but: was \u003cThu Apr 02 01:51:27 CEST 2015\u003e\n at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)\n```\n\nThe dates look the same but they differ in their milliseconds. \n\nI wrote my own method similar to fromOADate(double d, TimeZone tz) and pull out days, hours, minutes and seconds one by one out of the fraction ignoring millis and anything smaller (can't share it, sorry, but you get the idea).\n\nIt would be interesting if you can reproduce the error by copying the lines above into your test.\n","author":{"url":"https://github.com/frankgerhardt","@type":"Person","name":"frankgerhardt"},"datePublished":"2015-09-26T02:59:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1/oadate-java/issues/1"}
| 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:a02df2a7-6dc0-c09c-4ad1-1802250f390d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A978:1B65C7:27034DB:385C463:6A60C598 |
| html-safe-nonce | 72b37552a536d7fe6e6eff2941ceff49b33afa4a463234b29b660b019dbadde1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTc4OjFCNjVDNzoyNzAzNERCOjM4NUM0NjM6NkE2MEM1OTgiLCJ2aXNpdG9yX2lkIjoiMzI1NTUzMDQwODM3MDAyOTk3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ad187e6a35ab2a90ccba922c16580cd7518410eb7ed7d18245b6cb4537b5b9b5 |
| hovercard-subject-tag | issue:108435763 |
| 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/mt/oadate-java/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/899aaa130d834c494d6b6e3143bf79b005bfabb4526f690f75747ea10e75842a/mt/oadate-java/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/899aaa130d834c494d6b6e3143bf79b005bfabb4526f690f75747ea10e75842a/mt/oadate-java/issues/1 |
| og:image:alt | I added the following test to OleAutomationDateUtilTest assertThat("Day 2015" , oadu.fromOADate(42095.99407407407, GMT) , equalTo(d("Apr 1, 2015 11:51:27 pm GMT"))); and I get the following error j... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | frankgerhardt |
| hostname | github.com |
| expected-hostname | github.com |
| None | e30aeaafb59b2438b8b0aaa24f4c6777e8e86dae0737625adfc928cac5443cd5 |
| turbo-cache-control | no-preview |
| go-import | github.com/mt/oadate-java git https://github.com/mt/oadate-java.git |
| octolytics-dimension-user_id | 3988 |
| octolytics-dimension-user_login | mt |
| octolytics-dimension-repository_id | 2139525 |
| octolytics-dimension-repository_nwo | mt/oadate-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2139525 |
| octolytics-dimension-repository_network_root_nwo | mt/oadate-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 | 34b43e23ce2dc970fbfce25d0e96500f2af8266d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width