Open puelocesar opened 8 months ago
@asafkorem any idea?
Hey @puelocesar,
If you refer to the user's current local (NSLocale.currentLocale
) we don't currently have such a feature, but I believe it won't be very complicated to implement, if we'll swizzle the current locale within Detox.
Not sure how it can be implemented on Android (@gosha212 / @d4vidi ?)
Anyhow, it's very likely that we won't do that, since that's something that can be mocked within your app easily. Just make a date/time provider (which can be a soft wrapper for your current provider) in your code and mock it. You can use launch-arg as a parameter for the mocking.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.
In Bitrise and my local machine works fine compare Dates with iOS So for iOS i don't need change the timezone.
But using Android in my Local machine is in UTC
Should i use something like this?
adb shell setprop persist.sys.timezone "America/New_York"
Thanks
Description
On Xcode, I can change the TimeZone of the simulator by going to "Edit Scheme -> Run configuration -> Arguments Tab -> Add Environment Variables" and add TZ as the iOS env. But I could not find a way of doing that on Detox, the only thing I found on the documentation was launch args, which is a different thing.
Is there a way to achieve this with Detox? I tried several ways of passing TZ, but none worked
Your environment
Detox version: React Native version: Node version: Device model: OS: Test-runner (select one): jest / other