List of usage examples for java.time OffsetDateTime with
@Override
public OffsetDateTime with(TemporalAdjuster adjuster)
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.with(LocalDate.now()); System.out.println(d);//from ww w .j a va 2 s . com }
From source file:org.silverpeas.core.calendar.Recurrence.java
private OffsetDateTime normalize(final Temporal temporal) { OffsetDateTime dateTime = asOffsetDateTime(temporal); if (this.startDate != null) { return TemporalConverter.applyByType(this.startDate, t -> dateTime.with(LocalTime.MIDNIGHT.atOffset(ZoneOffset.UTC)), t -> dateTime.with(t.toOffsetTime())); }/*from w w w . jav a 2 s. c o m*/ return dateTime; }