Hi,
Try this code,
import java.util.SimpleTimeZone;
import java.util.Date;
import java.text.SimpleDateFormat;
public class datetest{
public static void main(
String kk[]){
SimpleDateFormatformatter;
SimpleTimeZone stz = new SimpleTimeZone(+8*60*60*1000,"Asia/Singapore");
SimpleTimeZone.setDefault(stz);
formatter = new SimpleDateFormat("ddMMMyyyy hh:mm:ss a");
Date date = new Date();
String timeStamp = formatter.format(date).toString()+"\n";
System.out.println("Time is "+timeStamp);
}
}
Hope this is what u wanted
Mahesh