I´m trying to set the date/time using the ADB shell but the shell only returns the current time.
I´ve tried:
adb shell date -s YYYYMMDD.HHmmss
Expanding on @uval's answer, you can use the following to update the date and time on the android device based on the time on your Windows machine:
set dateYYYY=%date:~10,4%
set dateMM=%date:~4,2%
set dateDD=%date:~7,2%
set timeHH=%time:~0,2%
set timeMM=%time:~3,2%
set timeSS=%time:~6,2%
adb shell su -c date %dateMM%%dateDD%%timeHH%%timeMM%%dateYYYY%.%timeSS%
adb shell su -c am broadcast -a android.intent.action.TIME_SET
Tested on a rooted Android 6.0 device and a Windows 10 PC.