1 Reply Latest reply: Oct 2, 2012 9:39 AM by jtahlborn RSS

    Problem with timezone

    Prem
      Hi ,

      I am not able to retrieve the time zone which I am setting :
           String date = "2012-09-25 00:00:00";
          
          Calendar cal = Calendar.getInstance();
          cal.setTimeZone(TimeZone.getTimeZone("CST"));
          
          
          SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
          sdf.setTimeZone(TimeZone.getTimeZone("CST"));
          
          cal.setTime(sdf.parse(date));
          System.out.println(cal.getTime());
          
      I want to set date to central day light saving timing .. I also used US/Central but till it is showing same result ...