shell: Fallback on ISO 8601 datetime string for screenshot date info
If the locale doesn't honor strftime()'s %c argument, we would end up feeding NULLs into GdkPixbuf tagging. Fallback to a sensible (although not nicely localized) datetime string. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1017
This commit is contained in:
parent
727195c767
commit
1b5e91e4b3
@ -202,6 +202,9 @@ write_screenshot_thread (GTask *result,
|
||||
cairo_image_surface_get_height (priv->image));
|
||||
creation_time = g_date_time_format (priv->datetime, "%c");
|
||||
|
||||
if (!creation_time)
|
||||
creation_time = g_date_time_format (priv->datetime, "%FT%T%z");
|
||||
|
||||
if (gdk_pixbuf_save_to_stream (pixbuf, stream, "png", NULL, NULL,
|
||||
"tEXt::Software", "gnome-screenshot",
|
||||
"tEXt::Creation Time", creation_time,
|
||||
|
Loading…
Reference in New Issue
Block a user