blob: ba26b76d63e2364be9e0a21424c71105c9280ce2 [file] [edit]
#include "shell_util.h"
#include <string.h>
const char *format_mtime(time_t mtime) {
static char buf[256];
struct tm *tpm;
struct tm tm;
tpm = zip_localtime(&mtime, &tm);
if (tpm == NULL) {
memcpy(buf, "<not valid>", 12);
}
else {
strftime(buf, sizeof(buf), "%a %b %d %Y %H:%M:%S", tpm);
}
return buf;
}