The catch here is that the DateFormat class has a timezone. Try this example instead: SimpleDateFormat sdfgmt = new ...
stackoverflow.com