question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

12-hour clock or 24-hour clock time in line charts?

See original GitHub issue

In the floating tooltips of line charts, I get time ranges like 0-0:05am and 23:55pm-0am. These timestamps append am/pm to a 24-hour clock, so they don’t follow the 12-hour clock rules.

Do you think it’s better to adhere to one of the standard time conventions (by removing the am/pm part, or minus 12 from the number of hours for >=13:00 and set 0am to 12am)?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
adrianmrozcommented, Jan 18, 2019

No, table labels and x-axis on line chart have additional logic to format time, so they have own methods: https://github.com/allegro/turnilo/blob/master/src/client/visualizations/table/table.tsx#L57 and https://github.com/allegro/turnilo/blob/master/src/client/components/line-chart-axis/line-chart-axis.tsx#L39 respectively. They both use d3.time to format and I think this function doesn’t respect timezone so it’s tied to #274. We need to think about what should be displayed and then use one formatter - d3.time.format or moment.format.

0reactions
l2dycommented, Jan 30, 2019

The bug is fixed, and we have a plan in #288 for unified time formatting. I’m closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

24-Hour Clock Conversion Chart.pdf
Converting Times from 12-hour clock to 24-Hour clock. In 24-hour (military) time, 12:00am is equal to 0000 and is read as “0 hundred...
Read more >
Visualizing Cyclical Time – Hour of Day Charts | Doug McCune
Some charts use a 12 hour circle, which mimics the display of an analog clock. Others display a full 24 hour circle.
Read more >
24-hour clock - Wikipedia
24 -hour clock ;... ... ; 22:00, 10:00 p.m. ; 23:00, 11:00 p.m. ; 24:00 equals 00:00 next day, 12:00 (midnight) · (end...
Read more >
Chart.js showing time (HH:MM:SS - 24 hour clock) on xAxis
Actually this is supported (at least in recent versions of chartjs). It seems like you have to specify the format for all the...
Read more >
Military Time: The 24 Hour Clock - Time and Date
Military Time uses a 24-hour time format and the NATO alphabet. How does it work? Conversion chart: What is 1500 Zulu Time in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found