mysql / mysql/mysql-shell-plugins

TIME values over 23 hours display "Valid hour range is 0-23"

Open
#93 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
96
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Description

When viewing a MySQL TIME column containing values greater than 23:59:59, MySQL Shell for VS Code displays the following error:

Valid hour range is 0-23

MySQL allows TIME values beyond 23 hours because the type can represent elapsed time. These values are valid and can be queried successfully using the MySQL CLI.

Steps to reproduce
CREATE TABLE time_test (
    value TIME
);

INSERT INTO time_test (value)
VALUES ('24:00:00'), ('25:30:00'), ('26:30:00');

SELECT * FROM time_test;
Expected behavior

The result grid displays the stored values:

  • 24:00:00
  • 25:30:00
  • 26:30:00
Actual behavior

The result grid reports:

Valid hour range is 0-23

Workaround

Casting the value to a string displays it correctly:

SELECT CAST(value AS CHAR) AS value
FROM time_test;
Additional context

This commonly occurs with attendance data where times after midnight are represented as extended hours, such as 25:30:00.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided CREATE TABLE, INSERT, and SELECT statements in the MySQL Shell for VS Code result grid, then trace the TypeScript handling of MySQL TIME values. Done means valid values such as 24:00:00, 25:30:00, and 26:30:00 display without the hour-range error, while the existing string-cast workaround remains unnecessary.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, typescript, vscode
Domain
database, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.