#36811 closed Uncategorized (duplicate)
Admin timezone warning shows incorrect plural form and confusing message
| Reported by: | Raufu Abdulrahman | Owned by: | |
|---|---|---|---|
| Component: | Uncategorized | Version: | 6.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Nilesh Pahari | Triage Stage: | Unreviewed |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The Django admin displays two issues with timezone offset warnings:
- Incorrect plural: Shows "1 hours behind" instead of "1 hour behind"
- Confusing message: "You are X hours behind server time" doesn't explain that times are displayed correctly in the user's local timezone
Steps to reproduce:
- Set TIME_ZONE = 'UTC' in settings.py
- View admin with browser in UTC+1 timezone (e.g., Lagos)
- Add/edit any model with DateTimeField
- Observe warning message
Expected:
- "1 hour behind" (singular, not "1 hours")
- Clear indication of which timezone is being displayed
Actual:
- "Note: You are 1 hours behind server time."
Component: contrib.admin
Type: Bug
Version: main
Change History (5)
comment:1 by , 8 hours ago
| Cc: | added |
|---|
comment:2 by , 8 hours ago
| Component: | Uncategorized → contrib.admin |
|---|
comment:3 by , 8 hours ago
| Component: | contrib.admin → Uncategorized |
|---|---|
| Has patch: | set |
comment:4 by , 8 hours ago
comment:5 by , 2 hours ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Raufu :) Thank you for reporting the issue and for taking the time to contribute to django .
You’re right that the current timezone warning message is awkward, but it looks like this issue already exists.
duplicate #35951
Note:
See TracTickets
for help on using tickets.
Patch submitted: https://github.com/django/django/pull/20428