aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/snmp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-12-10 22:19:29 +0000
committerGuy Harris <guy@alum.mit.edu>2009-12-10 22:19:29 +0000
commit4fde145bd2dceda9edf1f231a57794965ddc0bd7 (patch)
tree7c14448b49715a60aefc583ab03dc2796a151499 /asn1/snmp
parente1a76d5e2bfd3ecf9ab082a46dc2aa9c4bd4d4e2 (diff)
Add an argument to abs_time_to_str() and abs_time_secs_to_str()
indicating whether the time should be shown as local time or UTC. For now, always pass FALSE, meaning "show as local time". Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str() for times with one-second resolution, and update a comment in various macros in the WSP dissector, while we're at it. svn path=/trunk/; revision=31227
Diffstat (limited to 'asn1/snmp')
-rw-r--r--asn1/snmp/packet-snmp-template.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 3566e48065..51c1f33bc1 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -998,9 +998,10 @@ int dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, 4, FALSE);
seconds = tvb_get_letohl(tvb, offset+4);
ts.secs = seconds;
- proto_tree_add_time_format(tree, hf_snmp_engineid_time, tvb, offset+4, 4,
- &ts, "Engine ID Data: Creation Time: %s",
- abs_time_secs_to_str(seconds));
+ ts.nsecs = 0;
+ proto_tree_add_time_format_value(tree, hf_snmp_engineid_time, tvb, offset+4, 4,
+ &ts, "%s",
+ abs_time_secs_to_str(seconds, FALSE));
offset+=8;
len_remain=0;
}
@@ -1963,7 +1964,7 @@ void proto_register_snmp(void) {
"Engine ID Data: Text", "snmp.engineid.text", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
{ &hf_snmp_engineid_time, {
- "Engine ID Data: Time", "snmp.engineid.time", FT_ABSOLUTE_TIME, BASE_NONE,
+ "Engine ID Data: Creation Time", "snmp.engineid.time", FT_ABSOLUTE_TIME, BASE_NONE,
NULL, 0, NULL, HFILL }},
{ &hf_snmp_engineid_data, {
"Engine ID Data", "snmp.engineid.data", FT_BYTES, BASE_NONE,