Reputation: 1593
I'm running tests for my app, and I want to validate that it works in various time zones.
I'm trying solutions suggested here running adb shell setprop persist.sys.timezone "Pacific/Honolulu"
, but the timezone (and time) on emulator is not changing- can this work without restarting the device?
Upvotes: 4
Views: 2779
Reputation: 11
If you mean UI tests, I can not change android Date & Time
settings on emulator via adb shell.
The only solution I found is to set the timezone during the creation of the emulator with -timezone
option.
For example, you can create android emulator with a command like $ emulator @Nexus_5X_API_23 -timezone Europe/Paris
.
See more emulator command line options here
Upvotes: 1