Android: how to change the time in emulator?
Solution 1
Run>Debug Configurations/Run Configurations
Tab Target> Additional Emulator Command Line Options
-timezone America/New_York
Solution 2
use this command
C:\> adb shell
#date –- 2009-10-01 14:24:59
20070325.123456
#date –s 20070325.123456
Solution 3
I believe the emulator is set to the GMT timezone by default. You can specify the timezone for the emulator with the -timezone
parameter.
https://developer.android.com/studio/run/emulator-commandline.html
Solution 4
If you want to change date & time, from running emulator window go to:
Apps -> Settings -> Date & Time -> Disable Automatic date & time -> Set date & Set time
If you want to change timezone, from running emulator window go to:
Apps -> Settings -> Date & Time -> Disable Automatic time zone -> Select time zone
Solution 5
If you use IntelliJ you can do that from Run/Edit Configurations window. Go to Emulator tab and add this to "Additional command line options":
-timezone Europe/Helsinki
Android document gives this info:
-timezone Set the timezone for the emulated device to , instead of the host's timezone. must be specified in zoneinfo format. For example: "America/Los_Angeles" "Europe/Paris"
Zoneinfo format is also known as tz database. So to find you specific timezone, you can use the Wikipedia list here:
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Capsud
Updated on June 14, 2022Comments
-
Capsud almost 2 years
I've noticed that the time in my emulator for android projects is wrong. Its one hour behind. How do I go about changing the time and can I do it in eclipse?