diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index 0352c09..193c9f2 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
#ifndef __PARSER_H
#define __PARSER_H
+#include <time.h>
#include <sys/time.h>
#include <bluetooth/bluetooth.h>
#include <netinet/in.h>
}
if (!parser.state) {
- if (parser.flags & DUMP_TSTAMP)
- printf("%8lu.%06lu ", f->ts.tv_sec, f->ts.tv_usec);
+ if (parser.flags & DUMP_TSTAMP) {
+ struct tm tm;
+ time_t t = f->ts.tv_sec;
+ localtime_r(&t, &tm);
+ printf("%04d-%02d-%02d %02d:%02d:%02d.%06lu ",
+ tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec, f->ts.tv_usec);
+ //printf("%8lu.%06lu ", f->ts.tv_sec, f->ts.tv_usec);
+ }
printf("%c ", (f->in ? '>' : '<'));
parser.state = 1;
} else