aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dtn.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-02-27 19:01:27 +0000
committerGuy Harris <guy@alum.mit.edu>2010-02-27 19:01:27 +0000
commit500eb99cd9ae9503344998b811e4856a2bb6bfb2 (patch)
treef1ed4387361e37904198aac2f5e80833d74011b0 /epan/dissectors/packet-dtn.c
parent9dd11bb90eb4bca3f03f0f547da9be901a56f996 (diff)
Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year. Move the formats to a "time_fmt.h" file, included by the headers that use it. Have abs_time_to_str() and abs_time_secs_to_str() take the date format value, rather than a Boolean "show this as UTC" flag, as an argument. Document the ABSOLUTE_TIME_ formats a bit better. Use that format in the CCSDS and VCDU dissectors, rather than having those dissectors do the formatting themselves. svn path=/trunk/; revision=32034
Diffstat (limited to 'epan/dissectors/packet-dtn.c')
-rw-r--r--epan/dissectors/packet-dtn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dtn.c b/epan/dissectors/packet-dtn.c
index 431a26c4ae..0a5f7704ad 100644
--- a/epan/dissectors/packet-dtn.c
+++ b/epan/dissectors/packet-dtn.c
@@ -1285,7 +1285,7 @@ dissect_version_5_primary_header(packet_info *pinfo,
return 0;
}
time_since_2000 = (time_t) (timestamp + 946684800);
- time_string = abs_time_secs_to_str(time_since_2000, FALSE);
+ time_string = abs_time_secs_to_str(time_since_2000, ABSOLUTE_TIME_LOCAL);
proto_item_set_text(timestamp_item,
"Timestamp: 0x%x [%s]", timestamp, time_string);
offset += sdnv_length;
@@ -2090,7 +2090,7 @@ add_dtn_time_to_tree(proto_tree *tree, tvbuff_t *tvb, int offset, char *field_id
return 0;
}
time_since_2000 = (time_t) (sdnv_value + 946684800);
- time_string = abs_time_secs_to_str(time_since_2000, FALSE);
+ time_string = abs_time_secs_to_str(time_since_2000, ABSOLUTE_TIME_LOCAL);
proto_tree_add_text(tree, tvb, offset, sdnv_length,
"%s (sec): %d [%s]", field_id, sdnv_value, time_string);
offset += sdnv_length;
@@ -2121,7 +2121,7 @@ add_sdnv_time_to_tree(proto_tree *tree, tvbuff_t *tvb, int offset, char *field_i
return 0;
}
time_since_2000 = (time_t) (sdnv_value + 946684800);
- time_string = abs_time_secs_to_str(time_since_2000, FALSE);
+ time_string = abs_time_secs_to_str(time_since_2000, ABSOLUTE_TIME_LOCAL);
proto_tree_add_text(tree, tvb, offset, sdnv_length,
"%s: %d [%s]", field_id, sdnv_value, time_string);
return sdnv_length;