Get mobile time while performing an action

Hi all,

I am trying to automate a scenario in which we can capture the elements by using time difference. Can anybody help me on how to fetch the mobile device time on Android while performing an action using Appium.

I tried with driver.exceuteScript(“adb shell date -s “YYYYMMDD.hhmmss””);


driver.exceuteasyncScript(“adb shell date -s “YYYYMMDD.hhmmss””);

It says not yet implemented.

Thank you in advance.