Title: ICurrentDateProvider has two implementations with different clock semantics · Issue #5574 · getsentry/sentry-java · GitHub
Open Graph Title: ICurrentDateProvider has two implementations with different clock semantics · Issue #5574 · getsentry/sentry-java
X Title: ICurrentDateProvider has two implementations with different clock semantics · Issue #5574 · getsentry/sentry-java
Description: Audit finding A1 — design flaw (root cause), HIGH. ICurrentDateProvider.getCurrentTimeMillis() has two implementations with different clock semantics under the same method name: CurrentDateProvider → System.currentTimeMillis() (wall/epoc...
Open Graph Description: Audit finding A1 — design flaw (root cause), HIGH. ICurrentDateProvider.getCurrentTimeMillis() has two implementations with different clock semantics under the same method name: CurrentDateProvider...
X Description: Audit finding A1 — design flaw (root cause), HIGH. ICurrentDateProvider.getCurrentTimeMillis() has two implementations with different clock semantics under the same method name: CurrentDateProvider...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/5574
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ICurrentDateProvider has two implementations with different clock semantics","articleBody":"Audit finding **A1 — design flaw (root cause), HIGH**.\n\n`ICurrentDateProvider.getCurrentTimeMillis()` has two implementations with different clock semantics under the same method name:\n\n* `CurrentDateProvider` → `System.currentTimeMillis()` (wall/epoch) — `sentry/src/main/java/io/sentry/transport/CurrentDateProvider.java:18`\n* `AndroidCurrentDateProvider` → `SystemClock.uptimeMillis()` (monotonic, pauses in deep sleep) — `sentry-android-core/src/main/java/io/sentry/android/core/internal/util/AndroidCurrentDateProvider.java:20`\n\nEvery consumer must hand-pick the impl matching whatever it compares against (AnrV2/Tombstone use wall vs `ApplicationExitInfo.getTimestamp()`; LifecycleWatcher uses wall vs `Session.getStarted()`; AndroidEnvelopeCache uses uptime vs `TimeSpan.getStartUptimeMs()`; ANRWatchDog bypasses both with an inline uptime lambda). Nothing enforces the correct pairing: a wrong wiring compiles, is silent (tests inject fakes), and is catastrophic — e.g. uptime fed into `Timer.schedule(task, absoluteDate)` yields a 1970 date that fires instantly.\n\nEvery current pairing happens to be correct today, but only via careful manual wiring. This is the root hazard behind several of the other issues in this project.\n\nSource: [JAVA-557](\u003chttps://linear.app/getsentry/issue/JAVA-557/clock-usage-audit-wall-vs-monotonic-time-issues-across-the-sdk>) §A1.","author":{"url":"https://github.com/runningcode","@type":"Person","name":"runningcode"},"datePublished":"2026-06-22T09:04:12Z","url":"https://github.com/getsentry/sentry-java/issues/5574"}
| 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:e42431dc-1aad-21d8-7fe3-4e107bbe6a94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC14:AF327:A642E:E821F:6B0462E1 |
| html-safe-nonce | 8ed84ddbf0a558f02aa9ac7b7cd1a809d96e2e6bf7719f5009de192301bdf711 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzE0OkFGMzI3OkE2NDJFOkU4MjFGOjZCMDQ2MkUxIiwidmlzaXRvcl9pZCI6IjkwODE0Mzk0NTQxNjk5NDg4OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a636f7ce4c7e51e90e494184a01d89b9fb92437e97a3ab75d326a82b631a8168 |
| hovercard-subject-tag | issue:4715072939 |
| 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/getsentry/sentry-java/5574/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54d25b43282ed8dd89d5c23336f2dd113b14a84c5387efb88aa693df50026d8b/getsentry/sentry-java/issues/5574 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54d25b43282ed8dd89d5c23336f2dd113b14a84c5387efb88aa693df50026d8b/getsentry/sentry-java/issues/5574 |
| og:image:alt | Audit finding A1 — design flaw (root cause), HIGH. ICurrentDateProvider.getCurrentTimeMillis() has two implementations with different clock semantics under the same method name: CurrentDateProvider... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | runningcode |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-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 | 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