Java tutorial
import java.time.OffsetDateTime; import java.time.temporal.ChronoUnit; public class Main { public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.truncatedTo(ChronoUnit.DAYS); System.out.println(d); } }