microsoft / microsoft/react-native-windows
Date.now() gives different result depending on DEBUG or RELEASE mode...
Open
@vmoroz is already working on this.
Since Oct 30, 2023.
Area: JavaScript Engine
bug
Workstream: ES Compliance SFI
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Problem Description
In my production app, rnw apps show different Timestamps generated with Date.now() or new Date() print differnet timestamps. In Debug mode, the timestamp is accurate. In Release mode, the timestamp is off by 2 hours.
AS useColorScheme with Debugger always returns white, the text isnt really readable.
Light Theme: Debug Build
Dark Theme: Release Build
Steps To Reproduce
- Create new app.
- print Date.now()
- Build in Release
- Build in Debug
- See the difference.
Expected Results
Same timecode, independent of build mode.
CLI version
11.3.7
Environment
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Memory: 6.42 GB / 15.97 GB
Binaries:
Node:
version: 18.15.0
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 1.22.19
path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm:
version: 9.5.0
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions:
- 10.0.18362.0
- 10.0.19041.0
- 10.0.22000.0
- 10.0.22621.0
IDEs:
Android Studio: Not Found
Visual Studio:
- 17.5.33516.290 (Visual Studio Community 2022)
Languages:
Java: Not Found
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: ^18.2.0
react-native:
installed: 0.72.6
wanted: ^0.72.4
react-native-windows:
installed: 0.72.16
wanted: ^0.72.16
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Target Platform Version
10.0.19041
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
None
Snack, code example, screenshot, or link to a repository
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.