Export sprinttime

* defs.h (sprinttime): New prototype.
* file.c (sprinttime): Make global and move to util.c.
diff --git a/defs.h b/defs.h
index bcdf625..164842a 100644
--- a/defs.h
+++ b/defs.h
@@ -673,6 +673,7 @@
 extern int printflags(const struct xlat *, int, const char *);
 extern const char *sprintflags(const char *, const struct xlat *, int);
 extern const char *sprintmode(int);
+extern const char *sprinttime(time_t);
 extern void dumpiov_in_msghdr(struct tcb *, long);
 extern void dumpiov_in_mmsghdr(struct tcb *, long);
 extern void dumpiov(struct tcb *, int, long);
diff --git a/file.c b/file.c
index 7dfe0a6..af09189 100644
--- a/file.c
+++ b/file.c
@@ -506,27 +506,6 @@
 
 /* several stats */
 
-static char *
-sprinttime(time_t t)
-{
-	struct tm *tmp;
-	static char buf[sizeof("yyyy/mm/dd-hh:mm:ss")];
-
-	if (t == 0) {
-		strcpy(buf, "0");
-		return buf;
-	}
-	tmp = localtime(&t);
-	if (tmp)
-		snprintf(buf, sizeof buf, "%02d/%02d/%02d-%02d:%02d:%02d",
-			tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
-			tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
-	else
-		snprintf(buf, sizeof buf, "%lu", (unsigned long) t);
-
-	return buf;
-}
-
 #if defined(SPARC) || defined(SPARC64)
 typedef struct {
 	int     tv_sec;
diff --git a/util.c b/util.c
index cd4b802..71e921d 100644
--- a/util.c
+++ b/util.c
@@ -421,6 +421,27 @@
 	tprints("]");
 }
 
+const char *
+sprinttime(time_t t)
+{
+	struct tm *tmp;
+	static char buf[sizeof("yyyy/mm/dd-hh:mm:ss")];
+
+	if (t == 0) {
+		strcpy(buf, "0");
+		return buf;
+	}
+	tmp = localtime(&t);
+	if (tmp)
+		snprintf(buf, sizeof buf, "%02d/%02d/%02d-%02d:%02d:%02d",
+			tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
+			tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+	else
+		snprintf(buf, sizeof buf, "%lu", (unsigned long) t);
+
+	return buf;
+}
+
 static char *
 getfdproto(struct tcb *tcp, int fd, char *buf, unsigned bufsize)
 {