datatypes icon indicating copy to clipboard operation
datatypes copied to clipboard

datatypes.Date Incorrectly Sets Time When Date::Value Is Called

Open bonedaddy opened this issue 4 years ago • 0 comments

When Date::Value is called it incorrectly sets the time. Note that it sets 0 for values such as hour, minute, etc... This leads to incorrect values being stored in the database.

For example here is the result of running time.Now().Add(<time duration>):

2021-03-04 11:02:03.392804646 +0000 UTC

But the same value returned from the database using datatypes.Date is:

2021-03-04 08:00:00 +0000

This basically makes the Date type completely useless

bonedaddy avatar Feb 25 '21 11:02 bonedaddy