Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
proposal: database/sql: Return zero time.Time for nil values instead of error #28414
Currently when you retrieving null timestamps from database result is error: unsupported Scan, storing driver.Value type into type *time.Time. This requires additional work for adding helper class NullTime with Scan() and Value() methods and then parsing them. But type time.Time has its own check for nil type: Time.IsZero(). It is need just add next code to src/database/sql/convert.go:301 to reduce extra work for users: