Thanks jeff for your input
This what I coded but am not sure if it is correct as in the difference I am not accurately getting the time portion
import java.util.Date;
import java.io.*;
import java.util.Calendar;
import java.lang.Integer;
import java.util.GregorianCalendar;
import java.text.DateFormat;
public class parseDate {
public static void main(
String[] args) {
int givenDate = 2145916800; //1/1/2038
int givenTime = 86399; //11:59:59 PM
int totalTime = 2145916800 + 86399;
long totMilliSecs = totalTime *1000L;
System.out.println("befSet" + totMilliSecs);
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(totMilliSecs);
//testing
long gottotMilliSecs = cal.getTimeInMillis();
System.out.println("aftSet" + gottotMilliSecs);
DateFormat df1 = DateFormat.getDateTimeInstance();
Date dt = cal.getTime();
System.out.println("df1 bef making hour to zero " + df1.format(dt));
cal.set(Calendar.HOUR_OF_DAY,0);
cal.set(Calendar.MINUTE,0);
cal.set(Calendar.SECOND,0);
cal.set(Calendar.MILLISECOND,0);
dt = cal.getTime();
System.out.println("df1 setting hour:mim:sec to zero " + df1.format(dt));
long SecgottotMilliSecs = cal.getTimeInMillis();
System.out.println("aftreset" + SecgottotMilliSecs);
System.out.println("diff now " + (gottotMilliSecs - SecgottotMilliSecs));
}