environment: Fix date conversion

This is a regression from commit 06b690ff21:

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
This commit is contained in:
Florian Müllner 2020-03-02 13:46:04 +01:00
parent 837fbbf417
commit 0dd171a7c8

View File

@ -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(),