summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/util.c b/src/util.c
index 3e13108..d45822c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -494,18 +494,10 @@ int tr_snprintf(char *buf, size_t buflen, const char *fmt, ...)
gchar *epoch_to_string(gint64 epoch)
{
-#if GLIB_CHECK_VERSION(2, 26, 00)
GDateTime *dt = g_date_time_new_from_unix_local(epoch);
gchar *timestring = g_date_time_format(dt, "%F %H:%M:%S");
g_date_time_unref(dt);
return timestring;
-#else
- char buf[64];
- time_t time_val = epoch;
- struct tm *ts = localtime(&time_val);
- int wrote = strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts);
- return g_strndup(buf, wrote);
-#endif
}
/* wrap a link in text with a hyperlink, for use in pango markup.