import java.util.*; import java.text.*; import java.io.*; public class GMTtoCET{ public static void main(String args[]){ Date date = new Date(); DateFormat cetFormat = new SimpleDateFormat(); DateFormat gmtFormat = new SimpleDateFormat(); TimeZone gmtTime = TimeZone.getTimeZone("GMT"); TimeZone cetTime = TimeZone.getTimeZone("CET"); cetFormat.setTimeZone(gmtTime); gmtFormat.setTimeZone(cetTime); System.out.println("GMT Time: " + cetFormat.format(date)); System.out.println("CET Time: " + gmtFormat.format(date)); } }