From a2f2ef7ccee7b5969f0ed798fb372be51c2f69fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 2 Mar 2020 18:29:46 +0100 Subject: [PATCH] Fix off-by-1900 bug in dates --- 0001-environment-Fix-date-conversion.patch | 33 ++++++++++++++++++++++ gnome-shell.spec | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 0001-environment-Fix-date-conversion.patch diff --git a/0001-environment-Fix-date-conversion.patch b/0001-environment-Fix-date-conversion.patch new file mode 100644 index 0000000..8fb1e90 --- /dev/null +++ b/0001-environment-Fix-date-conversion.patch @@ -0,0 +1,33 @@ +From 0dd171a7c899806e93254d879bc126431d99c36b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Mon, 2 Mar 2020 13:46:04 +0100 +Subject: [PATCH] environment: Fix date conversion + +This is a regression from commit 06b690ff21204: + +GLib.DateTime.new() expects the full four-digit year, so passing +the abbreviated year from Date() will result in a bogus datetime. + +Today is *not* Saturday March 2nd, 120 ... + +https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1061 +--- + js/ui/environment.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/ui/environment.js b/js/ui/environment.js +index 8ab9e7d44..0450f7932 100644 +--- a/js/ui/environment.js ++++ b/js/ui/environment.js +@@ -320,7 +320,7 @@ function init() { + _localTimeZone = GLib.TimeZone.new_local(); + + let dt = GLib.DateTime.new(_localTimeZone, +- this.getYear(), ++ this.getFullYear(), + this.getMonth() + 1, + this.getDate(), + this.getHours(), +-- +2.25.1 + diff --git a/gnome-shell.spec b/gnome-shell.spec index a834e06..0d500c0 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -17,6 +17,8 @@ Patch1: gnome-shell-favourite-apps-firefox.patch Patch2: 0001-endSessionDialog-Immediately-add-buttons-to-the-dial.patch Patch3: 0002-endSessionDialog-Support-rebooting-into-the-bootload.patch +Patch4: 0001-environment-Fix-date-conversion.patch + %define libcroco_version 0.6.8 %define eds_version 3.33.1 %define gnome_desktop_version 3.33.4