import java.util.*;
import java.text.*;
public class Test {
public static void main(String args[]) {
Date date = new Date();
DateFormat gmtFormat =
new SimpleDateFormat("dd-MM-yyyy hh:MM:ss");
TimeZone gmtTime = TimeZone.getTimeZone("GMT");
gmtFormat.setTimeZone(gmtTime);
System.out.println("Current Time: " + date);
System.out.println("GMT Time: " + gmtFormat.format(date));
}
}