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