aboutsummaryrefslogtreecommitdiff
path: root/src/rc/supervise-daemon.c
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-05-11 16:06:12 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-05-11 16:06:12 -0500
commitcf5e9aa2bbcdf1783fadeab26586c1134929d928 (patch)
tree2033aec06cc4b684b971d28c7fe8053f76b7cbfa /src/rc/supervise-daemon.c
parenta3250e77d412f2290e381b9e7569930d95e4fc5b (diff)
Move time_t conversions to rc-misc.c so they can be shared
Diffstat (limited to 'src/rc/supervise-daemon.c')
-rw-r--r--src/rc/supervise-daemon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index bc5fd3d0..a971e6a3 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -185,7 +185,6 @@ static void child_process(char *exec, char **argv, char *svcname,
char **c;
char cmdline[PATH_MAX];
time_t start_time;
- char start_time_string[20];
char start_count_string[20];
#ifdef HAVE_PAM
@@ -344,8 +343,7 @@ static void child_process(char *exec, char **argv, char *svcname,
syslog(LOG_INFO, "Running command line: %s", cmdline);
if (svcname) {
start_time = time(NULL);
-strftime(start_time_string, 20, "%Y-%m-%d %H:%M:%S", localtime(&start_time));
- rc_service_value_set(svcname, "start_time", start_time_string);
+ rc_service_value_set(svcname, "start_time", from_time_t(start_time));
sprintf(start_count_string, "%i", start_count);
rc_service_value_set(svcname, "start_count", start_count_string);
}