Guy's, I am using some code in spring controller to get user time zone ('code is given below'), because the server of the web application we developed is located in UAE and the time given in datetime is getting to the server as UTC time. I am using this application from India, so that I want this time to be viewed as Indian Standard Time in the application. So I use this method to get the user time zone, and I try to convert UTC time to the user time zone, but unfortunately this conversion is not working, please help me
// code for getting time zone
TimeZone clientTimeZone = Calendar.getInstance(httpServletRequest.getLocale()).getTimeZone();
// This is the code used to convert UTC to client time zone
DateFormat sdf = new SimpleDateFormat("hh:mm:ss");
sdf.setTimeZone(clientTimeZone);
String time = sdf.format(dateTime);
return time;