title: Java/Kotlin: Why does Jackson parse dates differently from SimpleDateFormat?
body: <p>I'm sure this is some form of user error, but I can't puzzle out what I'm doing incorrectly.</p>
  
  <p>I have a Kotlin data class that with a constructor field like this:</p>
  
  <pre><code>data class CronEvent(
      @JsonFormat(
              shape = JsonFormat.Shape.STRING,
              pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'"
      )
      @JsonProperty("time")
      val time: Date
   )
  </code></pre>
  
  <p>This gets populated by ObjectMapper that accepts a json string as a payload. For my unit test, I have a <code>SimpleDateFormat</code> object that I instantiate with the same pattern.</p>
  
  <pre><code>val jsonStream = CronEventTests::class.java.classLoader.getResourceAsStream("CronEventPayload.json")
  val cronEvent = jsonStreamToCronEvent(jsonStream)
  // ...
  val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'")
  val expectedDate = simpleDateFormat.parse("2018-01-15T00:48:43Z")
  cronEvent.time shouldBe expectedDate
  </code></pre>
  
  <p>The json file (<code>CronEventPayload.json</code>) that I load in my unit test has the exact same date string (<code>2018-01-15T00:48:43Z</code>) yet my test fails.</p>
  
  <pre><code>java.lang.AssertionError: expected: Mon Jan 15 00:48:43 MST 2018 but was: Sun Jan 14 17:48:43 MST 2018
  Expected :Mon Jan 15 00:48:43 MST 2018 
  Actual   :Sun Jan 14 17:48:43 MST 2018
  </code></pre>
  
  <p>They have the same input and are utilizing the same date format string, but they're clearly different. Why are these two dates not the same?</p>