I want local date and time of my android phone. I have tried the following code :
Calendar calendar=Calendar.getInstance();
calendar.setTimeZone(TimeZone.getTimeZone("IST"));
String output=calendar.getTime()+"";
And i am getting output : Sat Mar 26 11:15:38 GMT+00:00 2016
and this is wrong actual date and time was "26th March 2016" and time was "16:46", i am getting date proper but time wrong and even got GMT timezone instead IST timezone. Is that because of Timezone if yes please let me know other solutions. Thanx in advance