summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/datetime.c3
-rw-r--r--runtime/syslogd-types.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/runtime/datetime.c b/runtime/datetime.c
index 46488433..2db1d3c5 100644
--- a/runtime/datetime.c
+++ b/runtime/datetime.c
@@ -123,8 +123,7 @@ static void getCurrTime(struct syslogTime *t, time_t *ttSeconds)
t->OffsetMode = '+';
t->OffsetHour = lBias / 3600;
t->OffsetMinute = lBias % 3600;
-
- t->timeType = 0; /* this is new and may cause format errors -- rgerhards, 2009-05-28 */
+ t->timeType = TIME_TYPE_RFC5424; /* we have a high precision timestamp */
}
diff --git a/runtime/syslogd-types.h b/runtime/syslogd-types.h
index 83b38f28..4a26f993 100644
--- a/runtime/syslogd-types.h
+++ b/runtime/syslogd-types.h
@@ -76,6 +76,10 @@ enum _EHostnameCmpMode {
};
typedef enum _EHostnameCmpMode EHostnameCmpMode;
+/* time type numerical values for structure below */
+#define TIME_TYPE_UNINIT 0
+#define TIME_TYPE_RFC3164 1
+#define TIME_TYPE_RFC5424 2
/* rgerhards 2004-11-11: the following structure represents
* a time as it is used in syslog.
* rgerhards, 2009-06-23: packed structure for better cache performance