lgwest
lgwest

Reputation: 1347

timezone in android emulator

have tried to change the timezon in android-emulator but it doesn't work. I write the -timezone option in eclipse menu: Window - Preferences - Android - Launch - Default Emulator options:
-timezone Europe/Stockholm
I found the timezone info here. In stockholm we add one hour to the british time. If my computer clock is e.g. 22.19 I also want the time in the android emulator to be 22.19. But it always show 21.19. How shall I give the -timezone arg to the emulator from inside eclipse so it works. I use winXp and Eclipse 3.5. And I have always restarted the emulator after each change of timezone.

Upvotes: 2

Views: 12891

Answers (3)

Jeff Hoye
Jeff Hoye

Reputation: 590

Duplicate: https://stackoverflow.com/a/2993414/980687

Run>Debug Configurations/Run Configurations

Tab Target> Additional Emulator Command Line Options

-timezone America/New_York

Upvotes: 1

Grou76
Grou76

Reputation: 41

Yes it works fine! Firstly you have to shutdown you emulator. Then in the menu clic "RUN" and then Run Configurations...

On the left, please select "Android Application" -> [name of your application]

On the right, clic the "target" tab, then scroll down and look for the "Additional Emulator Command Line Option" textbox. In that box you can specify: -timezone [desired timezone]

Example: -timezone Europe/Stockholm // -timezone America/Argentina/Mendoza // etc...

Upvotes: 4

Diego Torres Milano
Diego Torres Milano

Reputation: 69318

emulator -timezone Europe/Stockholm

Should work (on Linux). No quotes needed. Try this is an adb shell:

# date
Thu Dec  2 00:04:02 CET 2010
# date -u
Wed Dec  1 23:04:05 GMT 2010

Upvotes: 6

Related Questions