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

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

Is it possible to get device current date and time in APPIUM? if yes, then guide me plz

Yes, if you’re using Java, you can use the DateTime class