title: Convert date fomat "EEE MMM dd HH:mm:ss zzzz yyyy" to "yyyy-MM-dd'T'HH:mm:ss" in Java
body: <p>I have the code optimisation issue. Currently I am converting these two formats using java LocalDateTime. But it takes around 80 ms - 110 ms. This is increasing my response time as well. Is there an alternative and faster way to do this ??</p>
  <p>here is my code :</p>
  <pre><code>value= Tue Jan 01 00:19:32 CET 1901
  
  begindate = 1901-01-01T00:19:32
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>
  private static DateTimeFormatter formatter = DateTimeFormatter.ofPattern
  (&quot;EEE MMM dd HH:mm:ss zzz yyyy&quot;,Locale.ENGLISH);
  
  LocalDateTime beginDate = LocalDateTime.parse(value, formatter);
  
  String Isoformat = beginDate.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
  
  
  </code></pre>