dovecot-1.1: idxview: Show seconds (for most fields) in timestamps.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 12 09:45:36 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/3ea1b9bbaa1f
changeset: 7642:3ea1b9bbaa1f
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 12 09:44:11 2008 +0300
description:
idxview: Show seconds (for most fields) in timestamps.
diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
src/util/idxview.c | 12 +++++++++++-
diffs (29 lines):
diff -r 0b00870672bc -r 3ea1b9bbaa1f src/util/idxview.c
--- a/src/util/idxview.c Thu Jun 12 08:39:46 2008 +0300
+++ b/src/util/idxview.c Thu Jun 12 09:44:11 2008 +0300
@@ -22,6 +22,16 @@ struct dbox_index_header {
};
static const char *unixdate2str(time_t timestamp)
+{
+ static char buf[64];
+ struct tm *tm;
+
+ tm = localtime(×tamp);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", tm);
+ return buf;
+}
+
+static const char *unixdate2str_mins(time_t timestamp)
{
static char buf[64];
struct tm *tm;
@@ -235,7 +245,7 @@ static void dump_cache_hdr(struct mail_c
printf(" - ");
printf("%-4s %s\n",
cache_decision2str(field->decision),
- unixdate2str(cache->fields[cache_idx].last_used));
+ unixdate2str_mins(cache->fields[cache_idx].last_used));
}
}
More information about the dovecot-cvs
mailing list