I have a date which is in EST timezone. I need to convert it to EDT using Java 8.
I tried DateFormat.setTimeZone but didn't work. Please note my local server is in EDT time.
DateFormat edtFormat = new SimpleDateFormat("dd-MMM-YYYY HH:mm zzz");
edtFormat.setTimeZone(TimeZone.getDefault());
return edtFormat.format(date).toUpperCase(Locale.getDefault());