For debugging purposes, I would like to run my app on a certain date. I can change the date manually on my emulator, of course, but I was wondering if there was a simple way to do it from the emulator shell (I know it can't be done from the UI).
I am working with Win 7.
The correct format that worked for me is:
adb shell date -s "YYYYMMDD.hhmmss"
I saw in other threads this command, what really made the difference for me was to set under settings->Date & Time the options in this way. (Unselect the automatic date and time and time zone)
Passing seconds-since-epoch as per previous answer didn't work on my instance (WinXP Android SDK11 HVGA_1.6 emulator). However this particular format worked:
adb shell date -s "yyyymmdd.[[[hh]mm]ss]"
[Edited 6/27/2011: Added the time portion of the syntax.]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With