I\'m using Android Things Developer Preview on Raspberry Pi 3 Model B. Is there any way to set the correct date/time/timezone?
The easiest way to do this is probably using the date
shell command over ADB. It requires root, but all the preview images should allow root access. Here's an example that checks the date, sets it, and then verifies that the date change stuck:
$ adb root
restarting adbd as root
$ adb shell date
Sat Jan 1 00:02:40 GMT 2000
$ adb shell date 1227120016
Tue Dec 27 12:00:00 GMT 2016
$ adb shell date
Tue Dec 27 12:00:02 GMT 2016
You can determine the format of the date command accepts via adb shell date -h
. Be aware that this change may not persist through a power cycle as most of the dev kits don't have a battery-backed RTC.