Skip to content

Add iso8601_to_nstime() for editcap and nettrace

David Perry requested to merge boolean263/wireshark:iso8601-to-nstime into master

This adds a function to parse a string date-time in ISO 8601 format into a nstime_t structure. It's based on code from epan/tvbuff.c and wiretap/nettrace_3gpp_32_423.c and meant to eventually replace both. (Currently only replaces the latter, since that's code I've already recently touched in !1275 (merged).)

Since most of Wireshark expects ISO 8601 date-times to fit a fairly strict pattern, iso8601_to_nstime() currently rejects date-times without separators between the components, even though ISO 8601 actually permits this. This could be revisited later.

Also uses iso8601_to_nstime in editcap to parse the -A/-B options, thus allowing the user to specify a time zone if desired. (See #17110 (closed))

Merge request reports