I wrote the following code:
public static void main(String args[]) throws Exception {
SimpleDateFormat dateFormat = new SimpleDateFormat("y:M:dd z");
Date d = dateFormat.parse("2015:7:2 JST");
System.out.println(d);
}
It works fine, but the problem is that every time d will have machine`s timeZone. Is there a way to specify "destination" timeZone for SimpleDateFormat?