mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -292,7 +292,8 @@ function init() {
|
|||
|
||||
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
|
||||
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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue