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