Skip to content

Dates not displaying correctly in tables vs text #52

Open
@Bryon-Abbott

Description

@Bryon-Abbott

VSCode Mysql-Shell-Plugin Date Issues

I am experiencing an issues when displaying data via the mysql-shell-plugins associated with Date fields.

When data is displayed via a table in the mysql-shell-plugin, the dates displayed are a day earlier than the database.

I am guessing this is something to do with the Timezone default for VSCode or the mysql-plugin but not sure where to configure this?

Query via Terminal / mysql - OK

mysql> select * from aaExchangeRates where erDate between '2024-03-26' and '2024-04-05';
+------------+--------+---------+
| erDate     | erEUR  | erUSD   |
+------------+--------+---------+
| 2024-03-26 | 1.4711 | 1.35720 |
| 2024-03-27 | 1.4701 | 1.35870 |
| 2024-03-28 | 1.4632 | 1.35500 |
| 2024-04-01 | 1.4592 | 1.35740 |
| 2024-04-02 | 1.4609 | 1.35720 |
| 2024-04-03 | 1.4642 | 1.35370 |
| 2024-04-04 | 1.4666 | 1.35040 |
| 2024-04-05 | 1.4723 | 1.35980 |
+------------+--------+---------+
8 rows in set (0.00 sec)

mysql> 

Terminal Mysql Output - OK

Query via mysql-shell-plugin with Results as Text - OK

sql> select * from aaExchangeRates where erDate between '2024-03-26' and '2024-04-05' LIMIT 0, 1001;
+------------+--------+---------+
| erDate     | erEUR  | erUSD   |
+------------+--------+---------+
| 2024-03-26 | 1.4711 | 1.35720 |
| 2024-03-27 | 1.4701 | 1.35870 |
| 2024-03-28 | 1.4632 | 1.35500 |
| 2024-04-01 | 1.4592 | 1.35740 |
| 2024-04-02 | 1.4609 | 1.35720 |
| 2024-04-03 | 1.4642 | 1.35370 |
| 2024-04-04 | 1.4666 | 1.35040 |
| 2024-04-05 | 1.4723 | 1.35980 |
+------------+--------+---------+

VSCode Mysql Plugin Output - OK
Execute the block and print the results as text

Query via mysql-shell-plugin - Table vs Text - TABLE NOT-OK

When the same query is displayed as a table, the dates are displayed shifted 1 day earlier.
I also noticed that the display format has changed to a local format (MM/DD/YYYY) vs the default (YYYY-MM-DD)
Note the data is selected correctly according to the Where clause but displays as a day earlier.

VSCode-MySql-Issue-2

Here is the environment I am using.

  • OS: Linux Fedora 40
  • MySQL: Ver 8.4.0 for Linux on x86_64 (MySQL Community Server - GPL)
  • mysql-shell-plugins: v1.14.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions