[PR #5764] [MERGED] Closes #5503: ISO 8601 date in UI and alternative format as tooltip #13057

Closed
opened 2025-12-29 22:25:10 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5764
Author: @ypid
Created: 2/8/2021
Status: Merged
Merged: 7/6/2021
Merged by: @jeremystretch

Base: developHead: feature/5503-ui-iso-date-with-tooltip


📝 Commits (3)

  • 0ad9b83 Closes #5503: ISO 8601 date in UI and alternative format as tooltip
  • 74f1b51 Use annotated_date also for updated datetimes
  • a479c86 Do not use annotated_date on custom date fields to avoid date parsing

📊 Changes

20 files changed (+64 additions, -25 deletions)

View changed files

📝 netbox/extras/models/models.py (+2 -3)
📝 netbox/templates/base.html (+1 -1)
📝 netbox/templates/circuits/circuit.html (+1 -1)
📝 netbox/templates/dcim/rack.html (+1 -1)
📝 netbox/templates/dcim/site.html (+5 -1)
📝 netbox/templates/extras/journalentry.html (+1 -1)
📝 netbox/templates/extras/objectchange.html (+1 -1)
📝 netbox/templates/extras/report.html (+1 -1)
📝 netbox/templates/extras/report_list.html (+1 -1)
📝 netbox/templates/extras/report_result.html (+1 -1)
📝 netbox/templates/extras/script_list.html (+1 -1)
📝 netbox/templates/extras/script_result.html (+2 -2)
📝 netbox/templates/generic/object.html (+2 -2)
📝 netbox/templates/home.html (+1 -1)
📝 netbox/templates/inc/image_attachments.html (+2 -1)
📝 netbox/templates/ipam/aggregate.html (+1 -1)
📝 netbox/templates/users/api_tokens.html (+2 -2)
📝 netbox/templates/users/profile.html (+1 -1)
📝 netbox/templates/users/userkey.html (+5 -2)
📝 netbox/utilities/templatetags/helpers.py (+32 -0)

📄 Description

Fixes: #5503

With this PR all dates in the UI are now consistently displayed.

I changed the long date format as suggested by @xkilian and confirmed by my own research.

  • DATETIME_FORMAT
    • Before: July 20, 2020 4:52 p.m.
    • Now: 20th July, 2020 16:52

"20th July, 2020" would be spoken as "the 20th of July, 2020" but the "the" and "of" are never written.

I also switch from the illogical a.m./p.m. time format to military time format that can be pronounced as "sixteen hundred and fifty-two".


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/5764 **Author:** [@ypid](https://github.com/ypid) **Created:** 2/8/2021 **Status:** ✅ Merged **Merged:** 7/6/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `feature/5503-ui-iso-date-with-tooltip` --- ### 📝 Commits (3) - [`0ad9b83`](https://github.com/netbox-community/netbox/commit/0ad9b83623547627201c748ebe6c482440f16022) Closes #5503: ISO 8601 date in UI and alternative format as tooltip - [`74f1b51`](https://github.com/netbox-community/netbox/commit/74f1b51b38059fe300cb80090abf378ed9109e51) Use annotated_date also for updated datetimes - [`a479c86`](https://github.com/netbox-community/netbox/commit/a479c867c410a813fe5035c70f04331eb3fac0ae) Do not use annotated_date on custom date fields to avoid date parsing ### 📊 Changes **20 files changed** (+64 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/models/models.py` (+2 -3) 📝 `netbox/templates/base.html` (+1 -1) 📝 `netbox/templates/circuits/circuit.html` (+1 -1) 📝 `netbox/templates/dcim/rack.html` (+1 -1) 📝 `netbox/templates/dcim/site.html` (+5 -1) 📝 `netbox/templates/extras/journalentry.html` (+1 -1) 📝 `netbox/templates/extras/objectchange.html` (+1 -1) 📝 `netbox/templates/extras/report.html` (+1 -1) 📝 `netbox/templates/extras/report_list.html` (+1 -1) 📝 `netbox/templates/extras/report_result.html` (+1 -1) 📝 `netbox/templates/extras/script_list.html` (+1 -1) 📝 `netbox/templates/extras/script_result.html` (+2 -2) 📝 `netbox/templates/generic/object.html` (+2 -2) 📝 `netbox/templates/home.html` (+1 -1) 📝 `netbox/templates/inc/image_attachments.html` (+2 -1) 📝 `netbox/templates/ipam/aggregate.html` (+1 -1) 📝 `netbox/templates/users/api_tokens.html` (+2 -2) 📝 `netbox/templates/users/profile.html` (+1 -1) 📝 `netbox/templates/users/userkey.html` (+5 -2) 📝 `netbox/utilities/templatetags/helpers.py` (+32 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #5503 <!-- Please include a summary of the proposed changes below. --> With this PR all dates in the UI are now consistently displayed. I changed the long date format as suggested by @xkilian and confirmed by my own research. * DATETIME_FORMAT * Before: July 20, 2020 4:52 p.m. * Now: 20th July, 2020 16:52 "20th July, 2020" would be spoken as "the 20th of July, 2020" but the "the" and "of" are never written. I also switch from the illogical a.m./p.m. time format to military time format that can be pronounced as "sixteen hundred and fifty-two". --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:25:10 +01:00
adam closed this issue 2025-12-29 22:25:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13057