title: Java, parse string 'yyyy-MM-dd'T'HH:mm:ss' to ZonedDateTime without changing time
body: <p>I have a string &quot;2018-07-24T01:30:27&quot;. I want to parse this into ZonedDateTime with EST timezone without changing the time.</p>
  <p>I have the code...</p>
  <pre><code>String foo = &quot;2018-07-24T01:30:27&quot;;
  ZoneId zone = ZoneId.of(&quot;America/New_York&quot;);
  
  SimpleDateFormat simpleDateFormat = new SimpleDateFormat(&quot;yyyy-MM-dd'T'HH:mm:ss&quot;);
  return simpleDateFormat.parse(foo).toInstant().atZone(zone);
  </code></pre>
  <p>The return value is</p>
  <pre><code>2018-07-24T02:30:27-04:00[America/New_York]
  </code></pre>
  <p>I've tried creating this class as well, but it didn't help</p>
  <pre><code>@Configuration
  public class TimeZoneConfig {
  
      @PostConstruct
      public void init() {
  
          TimeZone.setDefault(TimeZone.getTimeZone(&quot;EST&quot;));
  
          System.out.println(&quot;Date in UTC: &quot; + new Date().toString());
      }
  }
  </code></pre>
  <p>Could I get some advice on this please?</p>