How to change time on Android 6 (Nexus 5x) with display off (adb?) I need to change time on my phone while screen is powered off (because of some notifications I need to test).

On other devices I did this in adb shell as root by typing: 

    date -s "YYYYMMDD.hhmmss"


But on this device my command has no effect (just printing out current time).

Do you have any advices?
I found answer here: https://stackoverflow.com/questions/32498628/change-date-on-rooted-device-android-m

I used wrong date format, apparently since Android M I should use 

   adb shell date $(date +%m%d%H%M%Y)


This works to me (in adb shell signed as root):

toolbox date -s 20161231.235959                          
Sat Dec 31 23:59:59 GMT 2016