OffsetDateTime withMinute(int minute)
returns a copy of this OffsetDateTime with the minute-of-hour value altered.
withMinute
has the following syntax.
public OffsetDateTime withMinute(int minute)
The following example shows how to use withMinute
.
import java.time.OffsetDateTime; public class Main { public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.withMinute(34); System.out.println(d); } }
The code above generates the following result.