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

fix decoding date and datetime value #26 #27

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

al-tush
Copy link
Contributor

@al-tush al-tush commented Jul 25, 2018

No description provided.

return time.ParseInLocation(dateFormat, unquote(v), d.location)
uv := unquote(v)
if uv == "0000-00-00" {
return time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC), nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why UTC, I do not found in documentation, that it is in UTC.
there is only this in doc:

 The minimum value is output as 0000-00-00.

Maybe need to create date in d.location instead of UTC?

return time.ParseInLocation(timeFormat, unquote(v), d.location)
uv := unquote(v)
if uv == "0000-00-00 00:00:00" {
return time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC), nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same here.

@al-tush
Copy link
Contributor Author

al-tush commented Aug 6, 2018

Clickhouse is not sensitive for all dates before 1970-01-02. I think using TZ in this case can be misleading.

@bgaifullin
Copy link
Contributor

Ok.
Thank you.

@bgaifullin bgaifullin merged commit 9a5a722 into mailru:master Aug 13, 2018
@al-tush al-tush deleted the issue26 branch August 14, 2018 16:06
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 this pull request may close these issues.

None yet

2 participants