Here you can find the source of startOfNextDay(final Date date, final TimeZone timeZone)
public static Date startOfNextDay(final Date date, final TimeZone timeZone)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class Main { public static Date startOfNextDay(final Date date, final TimeZone timeZone) { final Calendar cal = Calendar.getInstance(timeZone); cal.setTime(date);//from w ww . j av a 2s.c o m cal.add(Calendar.DATE, 1); cal.set(Calendar.HOUR, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 1); return cal.getTime(); } }