Android - Not able to get microseconds using java.time.Instant

浪子不回头ぞ 提交于 2020-05-14 10:14:33

问题


I am unable to get the microseconds using java.time.Instant (Instant.now()) from android.

I am getting the date time without microseconds like 2020-04-10T12:43:40.442Z from android

But when I execute a independent java program, with the use of java.time.Instant (Instant.now())

I am getting the date time with microseconds like 2020-04-10T12:43:40.442179Z

It seems the issue is with java versions in android studio. Please help me to fix this issue.

Note:

I have installed Android Studio - 3.6.1 and done the JDK 9(9.0.4) Setup in the Android studio Settings.

来源:https://stackoverflow.com/questions/61140653/android-not-able-to-get-microseconds-using-java-time-instant

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!