From 2a088c1d53ee1e1e3012f68aea745324a44e8120 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 6 Nov 2013 20:39:09 +0000 Subject: Add support for displaying dates as year and day-of-year (1-origin). In the process, fix various man page descriptions of the -t flag, and add support for UTC absolute times in the iousers and iostat TShark taps. svn path=/trunk/; revision=53114 --- rawshark.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'rawshark.c') diff --git a/rawshark.c b/rawshark.c index a2825fdc1e..8e762b625f 100644 --- a/rawshark.c +++ b/rawshark.c @@ -712,7 +712,9 @@ main(int argc, char *argv[]) else if (strcmp(optarg, "a") == 0) timestamp_set_type(TS_ABSOLUTE); else if (strcmp(optarg, "ad") == 0) - timestamp_set_type(TS_ABSOLUTE_WITH_DATE); + timestamp_set_type(TS_ABSOLUTE_WITH_YMD); + else if (strcmp(optarg, "adoy") == 0) + timestamp_set_type(TS_ABSOLUTE_WITH_YDOY); else if (strcmp(optarg, "d") == 0) timestamp_set_type(TS_DELTA); else if (strcmp(optarg, "dd") == 0) @@ -722,12 +724,22 @@ main(int argc, char *argv[]) else if (strcmp(optarg, "u") == 0) timestamp_set_type(TS_UTC); else if (strcmp(optarg, "ud") == 0) - timestamp_set_type(TS_UTC_WITH_DATE); + timestamp_set_type(TS_UTC_WITH_YMD); + else if (strcmp(optarg, "udoy") == 0) + timestamp_set_type(TS_UTC_WITH_YDOY); else { cmdarg_err("Invalid time stamp type \"%s\"", optarg); - cmdarg_err_cont("It must be \"r\" for relative, \"a\" for absolute,"); - cmdarg_err_cont("\"ad\" for absolute with date, or \"d\" for delta."); + cmdarg_err_cont( +"It must be \"a\" for absolute, \"ad\" for absolute with YYYY-MM-DD date,"); + cmdarg_err_cont( +"\"adoy\" for absolute with YYYY/DOY date, \"d\" for delta,"); + cmdarg_err_cont( +"\"dd\" for delta displayed, \"e\" for epoch, \"r\" for relative,"); + cmdarg_err_cont( +"\"u\" for absolute UTC, \"ud\" for absolute UTC with YYYY-MM-DD date,"); + cmdarg_err_cont( +"or \"udoy\" for absolute UTC with YYYY/DOY date."); exit(1); } break; -- cgit v1.2.3