Is it possible to get device current date and time in APPIUM?

@jonahss @Appium_Master @bhaskar @rgonalo @Hassan_Radi

Thanks In Advance :yum:

I would try the following:
iOS: idevicesyslog http://stackoverflow.com/questions/7277804/ios-iphone-ipad-ipodtouch-view-real-time-console-log-terminal

Android: adb logcat -v time

With these being both command line programs, you can Grep out the time stamp and format how you wish.

Hope this helps

We could add this data somewhere if you like. You could make a feature request in a github issue on the main appium project.

If you want to work on a pull request for this, we can work with you :smile:

1 Like

Sure @jonahss, I have made a feature request in a github issue with issue #5893.

1 Like

Is this feature implemented in Appium?

Hi try these, it works for me

iOS: idevicedate
Android : adb shell date

@sivaprasad you can use:

driver.getDeviceTime()
1 Like

Hi Telmo_Cardoso,

I need this format like (hh:mm:ss a) please help me with this.

driver.getDeviceTime(String format);–> i used this method but it work as which you give.
can you help me how to pass string in method.

Did you find a solution to this? I also need to format the time as HH:mm but can’t get the String format to work

I hope this link may helpful for the need.