[gnome-shell/ebassi/issue-5115] Use the same format for screencasts and screenshot file names
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/ebassi/issue-5115] Use the same format for screencasts and screenshot file names
- Date: Fri, 20 May 2022 16:45:31 +0000 (UTC)
commit d00af5cc11f397a424c4d5093248e634f750f303
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri May 20 17:40:35 2022 +0100
Use the same format for screencasts and screenshot file names
Screenshots use `%Y-%m-%d %H-%M-%S` for the timestamp, which has the
advantage of allowing proper lexicographical sorting.
The screencast file name pattern, on the other hand, uses
locale-dependent expansions, which break sorting based on file name, and
introduces the chance of potentially invalid characters on different
file systems.
Fixes: #5115
js/dbusServices/screencast/screencastService.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/dbusServices/screencast/screencastService.js b/js/dbusServices/screencast/screencastService.js
index 1fdf5c766e..0af43d2a74 100644
--- a/js/dbusServices/screencast/screencastService.js
+++ b/js/dbusServices/screencast/screencastService.js
@@ -308,7 +308,7 @@ var ScreencastService = class extends ServiceImplementation {
break;
case 'd': {
const datetime = GLib.DateTime.new_now_local();
- const datestr = datetime.format('%0x');
+ const datestr = datetime.format('%Y-%m-%d');
const datestrEscaped = datestr.replace(/\//g, '-');
filename += datestrEscaped;
@@ -317,7 +317,7 @@ var ScreencastService = class extends ServiceImplementation {
case 't': {
const datetime = GLib.DateTime.new_now_local();
- const datestr = datetime.format('%0X');
+ const datestr = datetime.format('%H-%M-%S');
const datestrEscaped = datestr.replace(/\//g, ':');
filename += datestrEscaped;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]