mirror of
https://github.com/abh/ntppool.git
synced 2026-04-25 19:45:50 +03:00
[PR #254] Fix 12-hour time format issue in graphs by implementing custom 24-hour formatter #541
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntppool#541
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/abh/ntppool/pull/254
Author: @Copilot
Created: 6/4/2025
Status: 🔄 Open
Base:
main← Head:copilot/fix-216📝 Commits (3)
1e6ed4cInitial plan for issueededda3Fix 12-hour time format issue in graphs by implementing custom 24-hour formatter3da5c13Update time formatter to ES5-compatible syntax for older browser support📊 Changes
2 files changed (+46 additions, -2 deletions)
View changed files
📝
docs/shared/static/js/graphs.server.js(+23 -1)📝
docs/shared/static/js/graphs.zone.js(+23 -1)📄 Description
This PR fixes the confusing time display issue in graphs where minutes were shown in 12-hour format without AM/PM indicators, while hours were correctly displayed in 24-hour format.
Problem
The issue occurred when D3.js default
tickFormat()method mixed 12-hour and 24-hour time formats, creating confusing sequences like:Solution
Implemented a custom 24-hour time formatter that replaces D3's default
x.tickFormat()in bothgraphs.server.jsandgraphs.zone.js:Result
Time displays are now consistent with 24-hour format throughout:
Changes
docs/shared/static/js/graphs.server.js- Added custom formatter for server graphsdocs/shared/static/js/graphs.zone.js- Added custom formatter for zone graphsTesting
Fixes #216.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.