From 57254de73afef5980a962fe099c9bdd2d2b43c2d Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 28 Jan 2015 20:01:20 +0100 Subject: [PATCH] If the monitor dir is available, set the TZ env into it This means we'll pull in changes from the timezone on the host system. --- xdg-app-helper.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xdg-app-helper.c b/xdg-app-helper.c index e670ac65..024d6d50 100644 --- a/xdg-app-helper.c +++ b/xdg-app-helper.c @@ -912,6 +912,7 @@ main (int argc, char *system_dbus_socket = NULL; char *session_dbus_socket = NULL; char *xdg_runtime_dir; + char *tz_val; char **args; char *tmp; int n_args; @@ -1376,6 +1377,12 @@ main (int argc, xdg_runtime_dir = strdup_printf ("/run/user/%d", getuid()); xsetenv ("XDG_RUNTIME_DIR", xdg_runtime_dir, 1); free (xdg_runtime_dir); + if (monitor_path) + { + tz_val = strdup_printf (":/run/user/%d/xdg-app-monitor/localtime", getuid()); + xsetenv ("TZ", tz_val, 0); + free (tz_val); + } __debug__(("launch executable %s\n", args[0]));