My user picks a date, which I store in epoch seconds (or milliseconds if necessary).
Separately my user picks a time of day and a timezone.
How do I adjust my epoch time with this new information. I feel like I should be able to add X milliseconds based on the hour/minute and then subtract based on the UTC offset of the timezone, but maybe there is a method that does this for me already
In Java, you should perform date and time manipulation via a java.util.Calendar
instance. You can use that for datetime storage, as well. Exactly how you would proceed depends on the form of the input and the desired form of the output, but it might go something like this:
public long computeDateTimeMillisUTC(long dateMillisUTC, int hour24,
int minute, TimeZone zone) {
Calendar cal = Calendar.getInstance(zone);
cal.setTimeInMillis(dateMillisUTC);
cal.set(Calendar.HOUR_OF_DAY, hour24);
cal.set(Calendar.MINUTE, minute);
return cal.getTimeInMillis();
}