12-hour clock or 24-hour clock time in line charts?
See original GitHub issueIn 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:
- Created 5 years ago
- Comments:13 (9 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
The bug is fixed, and we have a plan in #288 for unified time formatting. I’m closing this issue.