title: Kotlin - convert UTC to local time
body: <p>I'm trying to convert a UTC string date to local time, so it's in a more readable format. 
  I have a <code>textView</code> that in my activity layout:</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/dateTv"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="8dp"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/titleTv"
      tools:text="Published Date" /&gt;
  </code></pre>
  
  <p>In my activity: </p>
  
  <pre><code>class FullArticleActivity : AppCompatActivity() {
  
    override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.activity_full_article)
  
      val articleJson = intent.getStringExtra(ARTICLE_KEY)
  
  
      if(!articleJson.isNullOrBlank()) {
        val article = Gson().fromJson&lt;Article&gt;(articleJson, Article::class.java)
  
          val formatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ", Locale.getDefault())
          formatter.timeZone = TimeZone.getTimeZone("UTC")
          val formattedDate = formatter.parse(article.publishedAt)
  
        titleTv.text = article.title
        //UTC string
        dateTv.text = article.publishedAt
        contentTv.text = article.content
  </code></pre>
  
  <p>The <code>publishedAt</code> string is in this format from the api call <code>"2018-12-10T19:48:39Z"</code>. How can I convert this ZULU time format to local time?</p>