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 string conversion of timestamps containing microseconds #17

Closed
wants to merge 2 commits into from

Conversation

patrislav1
Copy link

ps_fetch_datetime() does not work for DATETIME(n) fields where n is between 1 and 5.

for example, when DATETIME(3) is used for millisecond resolution, the current version sprintf()s the first 3 digits of the microsecond field, but this yields a wrong output, when there are leading zeroes (see examples below).

Test values, type DATETIME(3):
2016-03-09 07:51:49.000
2016-03-09 07:51:49.001
2016-03-09 07:51:49.010

ps_fetch_datetime() output:
2016-03-09 07:51:49
2016-03-09 07:51:49.1000
2016-03-09 07:51:49.10000

Copy link
Contributor

@SergMariaDB SergMariaDB left a comment

Choose a reason for hiding this comment

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

Good day @patrislav1,

Please, consider rebasing to the latest HEAD.

Thanks

@9EOR9
Copy link
Collaborator

9EOR9 commented Mar 3, 2022

Already fixed.

@9EOR9 9EOR9 closed this Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants