-2

I tried this:

LocalDateTime.ofInstant(dateTime.toInstant(), ZoneId.systemDefault()))

But it gives compile time error:

The method ofInstant(java.time.Instant, java.time.ZoneId) in the type LocalDateTime is not applicable for the arguments (org.joda.time.Instant, java.time.ZoneId)
Jayram Kumar
  • 682
  • 2
  • 16
  • 28

1 Answers1

0

This works:

LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTime.getMillis()), ZoneId.systemDefault()))
Jayram Kumar
  • 682
  • 2
  • 16
  • 28