Documentation should note that localized date & time formats override configured defaults #9116

Closed
opened 2025-12-29 20:45:40 +01:00 by adam · 7 comments
Owner

Originally created by @stavr666 on GitHub (Jan 19, 2024).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.8

Steps to Reproduce

Edit configuration.py for datetime formatting

DATE_FORMAT = 'd F Y'
SHORT_DATE_FORMAT = 'Y-m-d'
TIME_FORMAT = 'H:i'
SHORT_TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'd F Y H:i'
SHORT_DATETIME_FORMAT = 'Y-m-d H:i'

Expected Behavior

Short datetime: 2023-09-21 22:13
According to documentation.

Observed Behavior

image

Originally created by @stavr666 on GitHub (Jan 19, 2024). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v3.7.1 ### Python Version 3.8 ### Steps to Reproduce Edit configuration.py for datetime formatting ```nim DATE_FORMAT = 'd F Y' SHORT_DATE_FORMAT = 'Y-m-d' TIME_FORMAT = 'H:i' SHORT_TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'd F Y H:i' SHORT_DATETIME_FORMAT = 'Y-m-d H:i' ``` ### Expected Behavior Short datetime: 2023-09-21 22:13 According to [documentation](https://demo.netbox.dev/static/docs/configuration/optional-settings/#date-and-time-formatting). ### Observed Behavior ![image](https://github.com/netbox-community/netbox/assets/84839985/bf4006bf-2b8b-470a-bc32-b283ef4416ab)
adam added the status: acceptedtype: documentation labels 2025-12-29 20:45:40 +01:00
adam closed this issue 2025-12-29 20:45:40 +01:00
Author
Owner

@abhi1693 commented on GitHub (Jan 19, 2024):

Could you provide more context about your issue? It looks like you have shared the screenshot from the Config revision table. Does this issue seen on other tables as well?

@abhi1693 commented on GitHub (Jan 19, 2024): Could you provide more context about your issue? It looks like you have shared the screenshot from the Config revision table. Does this issue seen on other tables as well?
Author
Owner

@stavr666 commented on GitHub (Jan 19, 2024):

Does this issue seen on other tables as well?

Yes, across all system, as far as I checked.

@stavr666 commented on GitHub (Jan 19, 2024): > Does this issue seen on other tables as well? Yes, across all system, as far as I checked.
Author
Owner

@jeremystretch commented on GitHub (Jan 19, 2024):

This is probably a localization issue. Do you have localization enabled (ENABLE_LOCALIZATION = True)?

@jeremystretch commented on GitHub (Jan 19, 2024): This is probably a localization issue. Do you have localization enabled (`ENABLE_LOCALIZATION = True`)?
Author
Owner

@stavr666 commented on GitHub (Jan 19, 2024):

Do you have localization enabled (ENABLE_LOCALIZATION = True)?

Yes.

@stavr666 commented on GitHub (Jan 19, 2024): > Do you have localization enabled (`ENABLE_LOCALIZATION = True`)? Yes.
Author
Owner

@jeremystretch commented on GitHub (Jan 19, 2024):

Ok, yeah. IIRC the locale's date & time format will override whatever is configured globally, which IMO is to be expected. Consider for instance a scenario where e.g. American users expect to see the date in MM/DD/YYYY format, and European users expect DD/MM/YYYY. (Both of which are wrong of course; ISO 8601 is the one true format!)

This may be more of a documentation issue.

@jeremystretch commented on GitHub (Jan 19, 2024): Ok, yeah. IIRC the locale's date & time format will override whatever is configured globally, which IMO is to be expected. Consider for instance a scenario where e.g. American users expect to see the date in MM/DD/YYYY format, and European users expect DD/MM/YYYY. (Both of which are wrong of course; [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) is the one true format!) This may be more of a documentation issue.
Author
Owner

@DanSheps commented on GitHub (Jan 19, 2024):

This may be more of a documentation issue.

I can also see a FR from this with user customizable date/time, but that would need to be opened as a FR.

@DanSheps commented on GitHub (Jan 19, 2024): > This may be more of a documentation issue. I can also see a FR from this with user customizable date/time, but that would need to be opened as a FR.
Author
Owner

@stavr666 commented on GitHub (Jan 19, 2024):

On some other product there is separate setting for Translation language and Regional culture.
As long as current translation state less useful than in-browser translation, I can freely disable localization.

But I think, if formats linked to Localization, than it must be considered to add separate User preference for Culture selection set or custom input box.

Will open separate FR later, ty.

@stavr666 commented on GitHub (Jan 19, 2024): On some other product there is separate setting for Translation language and Regional culture. As long as current translation state less useful than in-browser translation, I can freely disable localization. But I think, if formats linked to Localization, than it must be considered to add separate User preference for Culture selection set or custom input box. Will open separate FR later, ty.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9116