Title: [opsview-base] [310] Modified NFDump and NFCapd to use UTC rather than localtime
- Revision
- 310
- Author
- hstevenson
- Date
- 2013-07-11 17:00:45 +0100 (Thu, 11 Jul 2013)
Log Message
Modified NFDump and NFCapd to use UTC rather than localtime
Modified Paths
Added Paths
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2013-07-11 08:15:49 UTC (rev 309)
+++ trunk/Makefile 2013-07-11 16:00:45 UTC (rev 310)
@@ -426,6 +426,7 @@
cd ${NFDUMP} && patch -p1 < ../patches/nfdump-relative-time.patch
cd ${NFDUMP} && patch -p1 < ../patches/nfdump-log-err-only.patch
cd ${NFDUMP} && patch -p1 < ../patches/nfdump-file-list-prune.patch
+ cd ${NFDUMP} && patch -p1 < ../patches/nfdump-utc-timezone-fix.patch
${NFDUMP}-build: ${NFDUMP}
cd ${NFDUMP} && ./configure && make
Added: trunk/patches/nfdump-utc-timezone-fix.patch
===================================================================
--- trunk/patches/nfdump-utc-timezone-fix.patch (rev 0)
+++ trunk/patches/nfdump-utc-timezone-fix.patch 2013-07-11 16:00:45 UTC (rev 310)
@@ -0,0 +1,28 @@
+diff -ur nfdump-clean/bin//nfcapd.c nfdump-1.6.9/bin/nfcapd.c
+--- nfdump-clean/bin//nfcapd.c 2013-07-11 16:49:38.000000000 +0100
++++ nfdump-1.6.9/bin/nfcapd.c 2013-07-11 16:22:05.000000000 +0100
+@@ -762,6 +762,10 @@
+
+ int main(int argc, char **argv) {
+
++ //Set timezone to UTC for standardisation
++ setenv("TZ", "UTC", 1);
++ tzset();
++
+ char *bindhost, *filter, *datadir, pidstr[32], *launch_process;
+ char *userid, *groupid, *checkptr, *listenport, *mcastgroup, *extension_tags;
+ char *Ident, *pcap_file, *dynsrcdir, pidfile[MAXPATHLEN];
+diff -ur nfdump-clean/bin//nfdump.c nfdump-1.6.9/bin/nfdump.c
+--- nfdump-clean/bin//nfdump.c 2013-07-11 16:49:38.000000000 +0100
++++ nfdump-1.6.9/bin/nfdump.c 2013-07-11 16:51:36.000000000 +0100
+@@ -729,6 +729,10 @@
+ long gfile;
+ char Ident[IDENTLEN];
+
++ //Set timezone to UTC for standardisation
++ setenv("TZ", "UTC", 1);
++ tzset();
++
+ rfile = Rfile = Mdirs = wfile = ffile = filter = tstring = stat_type = NULL;
+ byte_limit_string = packet_limit_string = NULL;
+ fdump = aggregate = 0;
_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins