Skip to content

Conversation

@scottnemes
Copy link
Contributor

@scottnemes scottnemes commented Jan 23, 2026

Description

  • Fixes output from the timediff function when the result is a negative time value.

Before:

select timediff('2020-11-11 01:01:01', '2020-11-11 01:02:01');
-1 day, 23:59:00 

After

select timediff('2020-11-11 01:01:01', '2020-11-11 01:02:01');
-00:01:00

Fixes #1113

Checklist

  • I've added this contribution to the changelog.md.
  • I've added my name to the AUTHORS file (or it's already there).
  • I ran uv run ruff check && uv run ruff format && uv run mypy --install-types . to lint and format the code.

Copy link
Contributor

@rolandwalker rolandwalker left a comment

Choose a reason for hiding this comment

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

Super nice!

@rolandwalker
Copy link
Contributor

@scottnemes if you assign yourself the PR then it will be clear to us that you are handling the merge.

last image

@scottnemes scottnemes self-assigned this Jan 23, 2026
@scottnemes scottnemes changed the title Fix timediff output when the result is a negative value (#1113) [fix] Fix timediff output when the result is a negative value (#1113) Jan 23, 2026
@scottnemes scottnemes merged commit 314ebd6 into dbcli:main Jan 23, 2026
13 of 14 checks passed
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.

The result with mycli and mysql-client is different for timediff builtin func

2 participants