Here you can find the source of changeDateTimeZone(String date_GMT)
public static String changeDateTimeZone(String date_GMT) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { private static final TimeZone timeZone = TimeZone.getTimeZone("GMT-4:00"); public static String changeDateTimeZone(String date_GMT) throws ParseException { DateFormat format = new SimpleDateFormat("M/d/yyyy hh:mm:ss a"); format.setTimeZone(TimeZone.getTimeZone("GMT")); Date date = format.parse(date_GMT); format.setTimeZone(timeZone);/*from w w w . j a v a2s . co m*/ return format.format(date); } }