I have tried below code to convert the local date-time to a UTC date-time. But they are coming as same. I think I am missing something here. Can anyone please help me how can I get the UTC date time from local datetime 10/15/2013 09:00 AM GMT+05:30
. This date time string I get from a outer system so if needed I can change the format.
SimpleDateFormat outputFormatInUTC = new SimpleDateFormat("MM/dd/yyyy hh:mm aaa z");
String startDateTime = "10/15/2013 09:00 AM GMT+05:30";
Date utcDate = outputFormatInUTC.parse(startDateTime);