net.intelie.pipes.util.DSTHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pipes-api Show documentation
Show all versions of pipes-api Show documentation
Intelie Pipes' API classes and interfaces
package net.intelie.pipes.util;
import java.time.LocalDateTime;
import java.time.ZoneId;
public abstract class DSTHelper {
public static LocalDateTime nextValid(LocalDateTime time, ZoneId zone) {
LocalDateTime newTime = time.atZone(zone).toLocalDateTime();
if (!time.equals(newTime))
return newTime.withMinute(0).withSecond(0).withNano(0);
return newTime;
}
}