mijia / modelq

ModelQ is a code generator for creating Golang codes/models to access RDBMS database/tables
MIT License
293 stars 40 forks source link

Return null timestamp instead of misleading one if value is invalid #40

Closed elijahcarrel closed 5 years ago

elijahcarrel commented 5 years ago

If the value stored in the database does not convert into a valid time, I believe we should return time.Time{} instead of time.Now() so that the caller can appropriately handle the invalid value rather than operate under the false assumption that its value is the current timestamp.

mijia commented 5 years ago

Thank you very much.