environment: Reimplement Date.toLocaleFormat() override
Now that we no longer go through GTimeVal to convert from Date to GDateTime, there is no more reason for using a C helper function. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/807
This commit is contained in:
parent
3913fa5044
commit
ac1f896107
@ -292,7 +292,8 @@ function init() {
|
|||||||
|
|
||||||
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
|
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
|
||||||
Date.prototype.toLocaleFormat = function(format) {
|
Date.prototype.toLocaleFormat = function(format) {
|
||||||
return Shell.util_format_date(format, this.getTime());
|
let dt = GLib.DateTime.new_from_unix_local(this.getTime() / 1000);
|
||||||
|
return dt ? dt.format(format) : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
let slowdownEnv = GLib.getenv('GNOME_SHELL_SLOWDOWN_FACTOR');
|
let slowdownEnv = GLib.getenv('GNOME_SHELL_SLOWDOWN_FACTOR');
|
||||||
|
Loading…
Reference in New Issue
Block a user