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.
Instant.now().truncatedTo(ChronoUnit.NANOS);
? – AbsorptionInstant.now()
since Java 9 depends on the platform and the integration between the JVM and the platform. So I'd be afraid that you may not get better with Android Studio, or not with that version of Android Studio on that hardware and operating system. – Helio