Java tutorial
import java.sql.Timestamp; import java.time.LocalDateTime; import java.time.ZoneOffset; public class Main { public static void main(String[] args) { System.out.println(timeZoneAdjustedDate(LocalDateTime.now())); } public static Timestamp timeZoneAdjustedDate(LocalDateTime due) { return Timestamp.from(due.toInstant(ZoneOffset.ofHours(0))); } }