Skip to content
New issue

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

Decoder fails to decode type which converts to time.Time #633

Closed
magiconair opened this issue Feb 1, 2023 · 0 comments · Fixed by #634
Closed

Decoder fails to decode type which converts to time.Time #633

magiconair opened this issue Feb 1, 2023 · 0 comments · Fixed by #634
Milestone

Comments

@magiconair
Copy link
Member

The decoder will fail to decode time Timestamp time.Time as time.Time. The problem is in the code that detects a time type which is too strict. We need to use reflect.CanConvert

@magiconair magiconair modified the milestones: v0.3.10, v0.3.11 Feb 1, 2023
magiconair added a commit that referenced this issue Feb 1, 2023
The codec does not handle types that can be converted to time.Time
correctly since it is too strict in determining what a time.Time type
is. This patch relaxes this by checking if a type can be converted to
time.Time.

Fixes #633
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant