f-angi
1/17/2017 - 5:06 PM

Creates a date with Zulu timezone stripping out the original timezone

Creates a date with Zulu timezone stripping out the original timezone

import org.joda.time.format.DateTimeFormat;

public DateTime getDateAtStartOfDayWithZuluTimezone(Date date) {

    String dateFormat = "dd/MM/yyyy";
    return DateTimeFormat.forPattern(dateFormat).parseDateTime(new SimpleDateFormat(dateFormat).format(date));
}