Q:

how to convert Date Object to given from UTC to any time zone like IST,WAST

i am so confuse how to do that i have a database date in UTC i want to convert in any given format by user kile IST ,WAST,CST . Iwant to know how can i do so.I am passing the zone value which is given by client here is my code :
for getting value from client i am using this:
var localTimeZone = new Date().getTimezone(); 

after that i want to a method which have three parameter 
targetTimeFromZone(Date date, String fromTZ, String toTZ);

where fromTZ="UTC" and toTZ = "IST" or CST or any of time Zone.

A:

Avoid java.util.Date and .Calendar as they are notoriously troublesome. Use either Joda-Time or the java.time package in Java 8.
Per Jon Skeet's comment, avoid 3 or 4 letter time zone codes as they are neither standardized nor unique. Use proper time zone names.
A DateTime in Joda-Time knows its own assigned time zone, unlike j.u.Date.
DateTimeZone timeZone = DateTimeZone.forID( "Asia/Kolkata" ); // or get the default time zone.

Convert a Date to DateTime.
java.util.Date someDate = new java.util.Date(); // As if we were passed a Date.
DateTime dateTime = new DateTime( someDate, timeZone );

Adjust time zone.
DateTime dateTimeMontréal = dateTime.withZone( DateTimeZone.forID( "America/Montreal" ) );
DateTime dateTimeUtc = dateTime.withZone( DateTimeZone.UTC );

If required by other classes, generate a java.util.Date object.
java.util.Date date = dateTime.toDate();

Search StackOverflow for many more examples and discussion.

