]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rx.c
CHANGES: Add/move change(s) backported to 4.99
[tcpdump] / print-rx.c
index 26b51c19d881965370c5c49d3075f405f80248a3..3641a4c79e53a0016c2d19d664a5fbc1eeb8211b 100644 (file)
@@ -35,9 +35,7 @@
  * Ken Hornstein <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <stdio.h>
 #include <string.h>
@@ -794,12 +792,12 @@ rx_cache_find(netdissect_options *ndo, const struct rx_header *rxh,
                        ND_PRINT(" %" PRIu64, _i); \
                }
 
-#define DATEOUT() { time_t _t; struct tm *tm; char str[256]; \
+#define DATEOUT() { time_t _t; char str[256]; \
                        _t = (time_t) GET_BE_S_4(bp); \
                        bp += sizeof(int32_t); \
-                       tm = localtime(&_t); \
-                       strftime(str, 256, "%Y/%m/%d %H:%M:%S", tm); \
-                       ND_PRINT(" %s", str); \
+                       ND_PRINT(" %s", \
+                           nd_format_time(str, sizeof(str), \
+                             "%Y-%m-%d %H:%M:%S", localtime(&_t))); \
                }
 
 #define STOREATTROUT() { uint32_t mask, _i; \