title: Incorrect time-conversion in Go
body: <p>I am trying to convert the time string "2020-02-01T12:30:00+01:00" (from the google calendar API) to time.Time format in Go, for some reason it keeps giving me "2020-01-01 12:30:00 +0000 UTC" as output (which is first of January, instead of first of February). Any idea what I'm doing wrong? </p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "time"
      "log"
  )
  
  func main() {
  
      input := "2020-02-01T12:30:00+01:00"
      output, err := StrToTime(input)
      if err != nil{
          log.Fatal(err)
      }
  
      fmt.Println(output)
  
  
  }
  
  func StrToTime(strDateTime string) (time.Time, error) {
  
      layout := "2006-01-02T15:04:05+01:00"
      t, err := time.Parse(layout, strDateTime)
  
      if err != nil {
          return time.Time{}, fmt.Errorf("could not parse datetime: %v", err)
      }
  
      return t, nil
  
  }
  </code></pre>