Java tutorial
import java.time.LocalTime; public class Main { public static void main(String[] args) { System.out.println(toSqlTime(LocalTime.now())); } public static java.sql.Time toSqlTime(LocalTime localTime) { return java.sql.Time.valueOf(localTime); } }