We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7293c15 commit 4d47ac5Copy full SHA for 4d47ac5
packages/core/src/utils/time-provider/TimeProvider.tsx
@@ -36,7 +36,12 @@ export abstract class TimeProvider {
36
37
now(): number {
38
const timestamp = this.getTimestamp();
39
- if (timestamp.reactNative == null) {
+
40
+ if (timestamp.reactNative != null && this.baseOffset === 0) {
41
+ this.baseOffset = timestamp.unix - timestamp.reactNative;
42
+ }
43
44
+ if (timestamp.reactNative == null || this.baseOffset === 0) {
45
return timestamp.unix;
46
} else {
47
return this.baseOffset + timestamp.reactNative;
0 commit comments