You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zero value for a time.Time object is inconsistently handled between the Date and DateTime types.
If a user uses time.Time{} for a DateTime or a DateTime32 object, it gets translated to UNIX time of 0. But this is not the case for the ToDate functions for Date and Date32. Currently if time.Time{} is used for Date object the resulting date is 1974-10-01 due to casting a negative unix time to a uint.
Steps to reproduce
Create a zero-valued time
convert it to a Date and a DateTime
Notice inconsistent Dates
Expected behaviour
Both Date and date time convert time.Time{} to the same value, preferably 0
Describe the bug
zero value for a
time.Time
object is inconsistently handled between the Date and DateTime types.If a user uses
time.Time{}
for a DateTime or a DateTime32 object, it gets translated to UNIX time of 0. But this is not the case for theToDate
functions for Date and Date32. Currently iftime.Time{}
is used for Date object the resulting date is1974-10-01
due to casting a negative unix time to a uint.Steps to reproduce
Expected behaviour
Both Date and date time convert
time.Time{}
to the same value, preferably 0Code example
The text was updated successfully, but these errors were encountered: