1covert localdatetime to Instant object
2LocalDateTime().now().toInstant(ZoneOffset.UTC)
1import java.time.Instant;
2import java.time.LocalDateTime;
3import java.time.ZoneOffset;
4
5// ...
6
7//Convert instant to LocalDateTime, no timezone, add a zero offset / UTC+0
8LocalDateTime ldt = LocalDateTime.ofInstant(instant, ZoneOffset.UTC);
9