title: Reading system time in CST time zone using Java
body: <p>I am trying to read the system date in CST time zone using Java. I tried the below code but whenever I use <code>formatter.parse()</code> it is returning time in EST time zone.</p>
  
  <pre><code>private Date getTodayInCST() {
      Calendar currentdate = Calendar.getInstance();
      DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
      TimeZone obj = TimeZone.getTimeZone("CST");
      formatter.setTimeZone(obj);
  
      String today = formatter.format(currentdate.getTime());
      try {
          return formatter.parse(today);
      } catch (ParseException e) {
          e.printStackTrace();
      }
      return null;
  }
  </code></pre>