I have a date as string: 2019-02-23T15:26:22.794624+05:30
Now I want to parse it to show my local time:
I used this code
SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSX");
sdf3.parse(dateFromServer)
Also tried setting timezone but nothing changed:
sdf3.setTimeZone(TimeZone.getTimeZone("GMT"));
The output is :
Sat Feb 23 14:26:22 GMT+04:00 2019
Rather it should be :
Sat Feb 23 15:26:22 GMT+05:30 2019
Please help me understand this issue? Where I am doing wrong?