Here you can find the source of getStartTimeOfDay(long timeInLong)
public static long getStartTimeOfDay(long timeInLong)
//package com.java2s; import android.text.format.Time; public class Main { public static long getStartTimeOfDay(long timeInLong) { Time time = new Time(); time.set(timeInLong);//from ww w. j ava2 s. c om Time dayStartTime = new Time(); dayStartTime.year = time.year; dayStartTime.month = time.month; dayStartTime.monthDay = time.monthDay; return dayStartTime.toMillis(true); } }