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

Append only time #1240

Closed
wants to merge 2 commits into from
Closed

Append only time #1240

wants to merge 2 commits into from

Conversation

gkdr
Copy link

@gkdr gkdr commented Jul 26, 2021

Description

contains the changes i suggested in #1223

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

gkdr added 2 commits July 26, 2021 23:49
- adds support for the "time of day" format of the TIME type
- fixes falsely rejecting a valid date with year 0
@dolmen
Copy link
Contributor

dolmen commented Jun 2, 2023

This is on hold. See #1223 (comment)

I agree with @shogo82148. TIME values are not handled by database/sql. They should be handled as strings when user code communicate with database/sql. User code can use the sql.Scanner and driver.Value interface for convenience to implement automatic conversion.

@gkdr
Copy link
Author

gkdr commented Jun 2, 2023

Sure, I can just close the PR.

It's fine if you don't agree with my argument. What I cared about was the seemingly unintended behaviour change, and I simply wanted a decision.

@methane
Copy link
Member

methane commented Jun 3, 2023

It is too old change. No more discussion is needed for the unintended change.

This pull request is bit ugly, and have bug about handling TZ, as @shogo82148 mentioned in the issue.

Like this example, "date only" would be "-0001-12-31" or "0000-01-02". "date only" should be checked before calling t.In(loc).

https://go.dev/play/p/VBqOewWwJsI

@methane methane closed this Jun 3, 2023
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

3 participants