Here you can find the source of medTime(LocalDate date, String text)
public static Instant medTime(LocalDate date, String text)
//package com.java2s; //License from project: Apache License import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneId; public class Main { public static Instant medTime(String text) { return medTime(LocalDate.now(), text); }//from ww w . jav a 2 s. c om public static Instant medTime(LocalDate date, String text) { return LocalDateTime.of(date, LocalTime.parse(text)) .atZone(ZoneId.systemDefault()).toInstant(); } }