[gnome-shell] environment: Fix date conversion
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] environment: Fix date conversion
- Date: Mon, 2 Mar 2020 16:22:51 +0000 (UTC)
commit 0dd171a7c899806e93254d879bc126431d99c36b
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Mar 2 13:46:04 2020 +0100
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 8ab9e7d444..0450f79328 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(),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]