diff options
| author | Alexander Gaevsky <sasha@sasha0.ru> | 2015-12-27 01:32:28 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-07 19:15:57 +0300 |
| commit | 40601e5797e1ca0004185faf16d5f2c56fcdbbab (patch) | |
| tree | 7e5e01a4574c2ceab3c12cad8f5376430e3e7261 | |
| parent | 61437dd0a0a2592430ca912706524ffc0226f780 (diff) | |
[1.8.x] Fixed #24980 -- Fixed day determination in admin calendar widget.
Backport of 44930cc4667268c20493d7e97387db2a97d61a26 from master
| -rw-r--r-- | django/contrib/admin/static/admin/js/core.js | 5 | ||||
| -rw-r--r-- | docs/releases/1.8.9.txt | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/django/contrib/admin/static/admin/js/core.js b/django/contrib/admin/static/admin/js/core.js index 2c096aac6d..7526bd3ab9 100644 --- a/django/contrib/admin/static/admin/js/core.js +++ b/django/contrib/admin/static/admin/js/core.js @@ -225,7 +225,10 @@ String.prototype.strptime = function(format) { } ++i; }; - return new Date(year, month, day); + // Create Date object from UTC since the parsed value is supposed to be in + // UTC, not local time. Also, the calendar uses UTC functions for date + // extraction. + return new Date(Date.UTC(year, month, day)); } // ---------------------------------------------------------------------------- diff --git a/docs/releases/1.8.9.txt b/docs/releases/1.8.9.txt index 823bd9b3eb..5525eca84a 100644 --- a/docs/releases/1.8.9.txt +++ b/docs/releases/1.8.9.txt @@ -14,3 +14,7 @@ Bugfixes * Fixed a crash in the translations system when the current language has no translations (:ticket:`26046`). + +* Fixed a regression that caused the incorrect day to be selected when opening + the admin calendar widget for timezones from GMT+0100 to GMT+1200 + (:ticket:`24980`). |
