title: Scala - How to convert LocalDateTime to ZonedDateTime formatted without GMT postfix?
body: <p>I wanted to get the LocalDateTime in GMT so wrapped it with ZonedDateTime. </p>
  
  <p>But <code>gmtZoneTime</code> is returned in the following format: <code>2019-10-29T00:00Z[GMT]</code> While I need it to be: <code>2019-10-29T00:00:00.000+0000</code></p>
  
  <p>How should I properly convert <code>localDateTime</code> into the GMT ZonedDateTime? </p>
  
  <pre><code>val currentDate:LocalDate = java.time.LocalDate.now
  val localDateTime: LocalDateTime = currentDate.atStartOfDay
  val gmtZoneTime: ZonedDateTime = localDateTime.atZone(ZoneId.systemDefault()).withZoneSameInstant(ZoneId.of("GMT"))
  </code></pre>