I have implemented the below code in my app to display the date and time with timezone.
Date d = new Date();
SimpleDateFormat sdformat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a z");
sdformat.setTimeZone(TimeZone.getTimeZone("EST"));
System.out.println(sdformat.format(d));
If I run the above code in eclipse, I get the output as:
11/13/2015 07:23:56 PM EST
But for the same code in android device, I get the output as:
11/13/2015 07:23:56 PM GMT-5.00
Why is the difference, I need the date format to be displayed as:
11/13/2015 07:23:56 PM EST