How to get the EST timzone date (already convrted and get String) into date format with its Timezone? I tried with changing timezone and I got the perfect datetime in string format but while I am parsing that String date into date format it gives me local Android system timezone time.
Thanks for any help...in advance.
DateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm aa");
TimeZone tz = TimeZone.getTimeZone("EST");
outputFormat.setTimeZone(tz);
String current_date = outputFormat.format(date);
Date currentdate = outputFormat.parse(current_date);
It give's me EST date format in String (current_date). It give's me IST format date (currentdate)
0 comments:
Post a Comment