I like to know if it is possible to convert in Java 8 from LocalDate to OffsetDateTime.
For example assume that I have got this LocalDate:
1992-12-28
Then I would like to have it converted to this OffsetDateTime
:
1992-12-28T00:00-03:00
Assume that we know the time zone, for example America/Santiago.
You can try this..
OffsetDateTime o = OffsetDateTime.of(LocalDate.now(),LocalTime.NOON, ZoneOffset.UTC);
OffsetDateTime o1 = OffsetDateTime.of(LocalDateTime.now(), ZoneOffset.UTC);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With