Category: Go

  • [Go & MySQL] parseTime option

    [Go & MySQL] parseTime option

    Intro When working with MySQL databases in Go, handling DATE, DATETIME, and TIMESTAMP fields can sometimes lead to confusion, especially when dealing with time parsing. By default, Go’s MySQL driver treats date and time fields as []uint8 (byte slices) unless explicitly configured to handle them as time.Time. This behavior can cause issues if you’re expecting…