title: json: unsupported type: func() time.Time Marshaling CreatedAt, UpdatedAt and DeletedAt
body: <p>How can I resolve the error <code>json: unsupported type: func() time.Time</code> trying to return a newly saved model back as JSON.</p>
  <pre><code>user := database.DBConn.Create(&amp;newUser)
  return c.Status(http.StatusCreated).JSON(user) // fiber response
  </code></pre>
  <p>Tried ignoring the timestamp fields.</p>
  <pre><code>type User struct {
      gorm.Model
      ID uuid.UUID `gorm:&quot;primary_key;type:uuid;default:uuid_generate_v4()&quot;`
      Phone     string `json:&quot;phone&quot;`
      FirstName string `json:&quot;firstName&quot;`
      LastName  string `json:&quot;lastName&quot;`
      Email string `json:&quot;email&quot;`
      CreatedAt time.Time `json:&quot;-&quot;`
      UpdatedAt time.Time `json:&quot;-&quot;`
      DeletedAt time.Time `json:&quot;-&quot;`
  }
  </code></pre>
  <p>Also tried</p>
  <pre><code>CreatedAt time.Time `gorm:&quot;type:timestamp&quot; json:&quot;created_at,string,omitempty&quot;`
  UpdatedAt time.Time `gorm:&quot;type:timestamp&quot; json:&quot;updated_at,string,omitempty&quot;`
  DeletedAt time.Time `gorm:&quot;type:timestamp&quot; json:&quot;deleted_at,string,omitempty&quot;`
  </code></pre>
  <p>And</p>
  <pre><code>CreatedAt time.Time `gorm:&quot;type:datetime&quot; json:&quot;created_at,string,omitempty&quot;`
  UpdatedAt time.Time `gorm:&quot;type:datetime&quot; json:&quot;updated_at,string,omitempty&quot;`
  DeletedAt time.Time `gorm:&quot;type:datetime&quot; json:&quot;deleted_at,string,omitempty&quot;`
  </code></pre>
  <p>Using gorm v1.20.12 and Go 1.15.6</p>