]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsipc: use strtm_iso()
authorKarel Zak <kzak@redhat.com>
Tue, 24 May 2016 09:10:57 +0000 (11:10 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 24 May 2016 09:10:57 +0000 (11:10 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lsipc.c

index 195ee15de854bb33f5191719867bbe5079e6bcef..6e01f47ace5a4841a2918d9263984dad5e1df23d 100644 (file)
@@ -39,6 +39,7 @@
 #include "xalloc.h"
 #include "procutils.h"
 #include "ipcutils.h"
+#include "timeutils.h"
 
 /*
  * time modes
@@ -466,7 +467,7 @@ static char *make_time(int mode, time_t time)
                        strftime(buf, sizeof(buf), "%Y-%b%d", &tm);
                break;
        case TIME_ISO:
-               strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z", &tm);
+               strtm_iso(&tm, ISO_8601_DATE|ISO_8601_TIME|ISO_8601_TIMEZONE, buf, sizeof(buf));
                break;
        default:
                errx(EXIT_FAILURE, _("unsupported time type"));