Skip to content

Flag for disabling microseconds time resolution support #714

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

Conversation

josephbuchma
Copy link

@josephbuchma josephbuchma commented Nov 27, 2017

This change allows to restore v1.2 behavior of
dealing with time.Time values.

When connection is open with disableMilliseconds=true
time.Time values will be rounded DOWN to second resolution
before insert into database.

Related issue #713

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

This change allows to restore v1.2 behavior of
dealing with time.Time values.

When connection is open with `disableMilliseconds=true`
time.Time values will be rounded DOWN to second resolution
before insert into database.
@methane
Copy link
Member

methane commented Nov 28, 2017

DATETIME(6) keeps micro seconds, not milli.
So option name should be subsecond instead of millisecond.

But as I wrote in #713, I'm -1 on adding option until I understand how it's important.

@josephbuchma josephbuchma changed the title Flag for disabling milliseconds time resolution support Flag for disabling microseconds time resolution support Nov 28, 2017
@julienschmidt
Copy link
Member

@josephbuchma Can you elaborate when the behavior this flag provides is useful?

@methane
Copy link
Member

methane commented Apr 4, 2019

It's too late to "for v1.2 compatibility".
User should manually round down if they need.

@methane methane closed this Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants