I want to get the accurate current date and time for a zone in milliseconds, I found this method.
.....
Local Datetime localDateTime2=LocalDateTime.parse(timestamp,DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss"));
long milliss=localDateTime2.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
The above works fine but the code displayed requires api 26 and above. Is there a different method that supports lower apis achieving same result. Please help