title: How to set default Timezone on GORM time.Time data type
body: <p>I am using gorm with mysql as database with go module like this :</p>
  <ul>
  <li>gorm.io/gorm v1.21.7</li>
  <li>github.com/go-sql-driver/mysql v1.6.0</li>
  </ul>
  <p>My system timezone is +07:00 (Asia/Jakarta), and the mysql timezone is using the system timezone itself.</p>
  <p>but something wrong happen when I've struct like this</p>
  <pre><code>type Name struct {
      ID         uint64    `gorm:&quot;id;primaryKey;autoIncrement&quot;`
      Name       string    `gorm:&quot;column:name&quot;`
      CreatedAt  time.Time `gorm:&quot;column:created_at&quot;`
      UpdatedAt  time.Time `gorm:&quot;column:updated_at&quot;`
  }
  </code></pre>
  <p>on the mysql table created_at and updated_at declared as <strong>DATETIME</strong>, when I print the CreatedAt and UpdatedAt value, the timezone is +0000 (UTC), when I'm trying to use the <a href="https://pkg.go.dev/time#Time.In" rel="nofollow noreferrer">Time.In</a> function I got the wrong value, like I'm converting a time from UTC to +07:00, how can I declare to GORM that I'm using +07:00 as default timezone.</p>