We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For some reasons, the sql file is not having correct date time for the date field .
The resulting sql file shows date time as '&{2021-08-05 00:00:00 +0000 UTC %!s(bool=true)}'
Do I need to do any specific setting for this behaviour. When I restore, it sets date time as 0000-00-00.
Kindly suggest what is the fix for this.
Neeraj
The text was updated successfully, but these errors were encountered:
Hello, I also experienced this issue. Here's how I fixed it:
Disclaimer: not a good implementation, just a quick fix for a private project
Before dump.go, line 481, insert:
case *sql.NullTime: if s.Valid { if s.Time.Format(time.TimeOnly) == "00:00:00" { fmt.Fprintf(&b, "'%s'", s.Time.Format(time.DateOnly)) } else { fmt.Fprintf(&b, "'%s'", s.Time.Format(time.DateTime)) } } else { b.WriteString(nullType) }
Not sure if this works for all database-types. Tested with mariadb 10.5.15.
Sorry, something went wrong.
No branches or pull requests
For some reasons, the sql file is not having correct date time for the date field .
The resulting sql file shows date time as '&{2021-08-05 00:00:00 +0000 UTC %!s(bool=true)}'
Do I need to do any specific setting for this behaviour. When I restore, it sets date time as 0000-00-00.
Kindly suggest what is the fix for this.
Neeraj
The text was updated successfully, but these errors were encountered: