Misleading datetime in revert message. Easy fix.
See original GitHub issueReversion is a wonderful project, nevertheless I found a subtle bug.
The revert action saves the admin log message “Reverted to previous version, saved on <datetime>”. When the settings.USE_TZ = True
, then the code localize(version.revision.date_created)
makes the timezone-aware datetime object nicely human readable, but cuts off the UTC timezone info.
I believe the fix is how Django renders the datetimes in templates: localize(timezone.template_localtime(...)
. Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
6 Ways to Fix Dates Formatted as Text in Excel
Step 3 of the Wizard: Choose 'Date' from the 'Column Data Format' options and choose your date format from the drop down list...
Read more >Excel Online date/time displays wrong despite setting Locale in
I do so through OneDrive settings. Specifically `Region Settings > Locale`. According to https://sharepointmaven.com/change-date-format- ...
Read more >Give warning when wrong datetime field widget is set - Drupal
The fields revert to the core widget which provides a default of "now" if no date is entered. This causes the wrong behavior...
Read more >Why is My Automatic Date and Time Wrong on Android? 5 ...
Are you struggling because your device shows the wrong date and time? The issue can be caused by bugs or misconfigured date and...
Read more >How to Fix It When the Time on Your Phone Is Wrong - Lifewire
Restart your Android. · Turn on Android's automatic date/time setting. · Set the time manually. · The wrong time zone setting is a...
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 FreeTop 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
Top GitHub Comments
@arogachev Thanks, Alex. 👍
😃 Isn’t this one really a simple change to start a fork for it so I could give you a pull rq?