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

Time is showing 24:00 instead of 00:00 #9538

Closed
snblitz opened this issue Mar 11, 2019 · 6 comments · Fixed by #15426
Closed

Time is showing 24:00 instead of 00:00 #9538

snblitz opened this issue Mar 11, 2019 · 6 comments · Fixed by #15426
Assignees
Labels
Milestone

Comments

@snblitz
Copy link

snblitz commented Mar 11, 2019

Bugs

timedate shows 24:xx instead of 00:xx.

  • Firefox 66.0b14 (64-bit)
  • Debian 9
  • Postgres
  • Metabase v0.31.2
  • hosted in Debian 9
  • H2 database

Repeatable steps to reproduce the issue*

Set the date in a table to display in yyyy-m-d h:m:s 24 hour format.
Look at a datetime with the time in 00:xx range. See 24:xx instead of 00:xx

SS

⬇️ Please click the 👍 reaction instead of leaving a +1 or update? comment

@snblitz
Copy link
Author

snblitz commented Mar 11, 2019

flamber wrote:
Hi @snblitz

I can reproduce this on H2 Sample Data on 0.31.2 - I’ve never noticed the “24” before now.
Can you create an issue on this: https://github.com/metabase/metabase/issues/new
This is both a bug and a feature request. I would say that the bug is more important.

@lenn4rd
Copy link

lenn4rd commented Mar 28, 2019

We're seeing the same bug running the same Metabase version against a Postgres database. The columns are timezone-aware and stored in UTC time in the database; the timestamps are shown as 2019-03-28 24:11 in Metabase.

Let me know if I can provide additional information and help triaging in any way.

@salsakran salsakran added Type:Bug Product defects Priority:P2 Average run of the mill bug Misc/Timezones Visualization/ labels Apr 10, 2019
@poorlymac
Copy link

Hi, I have debugged this to the use of "24 hour time from 1 to 24" in moment.js https://momentjs.com/docs/ of the format k:mm rather than using the format H:mm (or as I prefer HH:mm) to get 0 to 24. If you grep through the source k:mm occurs in date.js and column.js. The temporary hack I have done to fix this is to run this SQL on the metabase database UPDATE metabase_field SET settings = REPLACE(settings, '"k:mm', '"HH:mm') WHERE settings LIKE '%"k:mm%';

@spinus
Copy link

spinus commented Sep 16, 2020

@snblitz did you verify if only 24 is displayed instead of 00 or actually all hours are shifted +1?

@flamber
Copy link
Contributor

flamber commented Sep 16, 2020

@spinus This is just a visual formatting issue, not a timezone issue, so nothing is shifted.

The tricky part of the issue is to fix all existing defined formatting (report_(dashboard)card.visualization_settings and metabase_field.settings), which would need a migration.

@szsuyuji

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants