title: Swift - date formatter returns unwanted time
body: <p>If I convert "2019-01-01T00:00:00+0000" to a date, I would like the date to be the date in the string - January 1, 2019. And if I calculate the number of seconds in the time portion, I would like the result to be zero. </p>
  
  <p>The problem is, when I convert my string into a date, it is stored in the UTC timezone. My locale is set to "en_US_POSIX", and my time zone is set to current. My date formatter uses "yyyy-MM-dd'T'HH:mm:ssZ". I know that the final Z means UTC, but I can't seem to figure out the correct field symbol to get the results I want.</p>
  
  <pre><code>func convertToDate(_ dateString: String) -&gt; Date {
     let dateFormatter = DateFormatter()
     dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
     dateFormatter.locale = Locale(identifier: "en_US_POSIX")
     dateFormatter.timeZone = .current
     let date = dateFormatter.date(from: dateString)
        else {
           print("DATE ERROR:", dateString)
           return Date()
        }
     return date
  } 
  </code></pre>