Skip to content

Commit

Permalink
mysql: add parseTime query flag to mysql dsn
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeneas Rekkas (arekkas) committed Oct 18, 2016
1 parent 34a6e78 commit edb9d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func ConnectToMySQL(tries int, delay time.Duration, connector func(url string) b

for try := 0; try <= tries; try++ {
time.Sleep(delay)
url := fmt.Sprintf("%s:%s@tcp(%s:%d)/mysql", MySQLUsername, MySQLPassword, ip, port)
url := fmt.Sprintf("%s:%s@tcp(%s:%d)/mysql?parseTime=true", MySQLUsername, MySQLPassword, ip, port)
if connector(url) {
return c, nil
}
Expand Down

0 comments on commit edb9d94

Please sign in to comment.