Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-users: Re: [Ethereal-users] Text2pcap - Timestamps problem on Windows98 (Swedish)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Martin Regner" <martin.regner@xxxxxxxxx>
Date: Mon, 14 Apr 2003 23:56:22 +0100
Guy Harris wrote:
>Check to see what happens after the "strptime()" call in
>"parse_preamble()" - print out the members of the "timecode" structure,
>to make sure the day/month/year/hour/minute/second values are set
>appropriately (for example, for "22/11/2001 20:03:24.4375", that's
>
> timecode.tm_sec: 24
> timecode.tm_min: 3
> timecode.tm_hour: 20
> timecode.tm_mday: 22
> timecode.tm_mon: 10
> timecode.tm_year: 101 (2001-1900)
>


It seems that the problem is that the timecode structure doesn't have the correct values after the call to
strptime(). I haven't yet checked what happens in strptime. 

C:\Program\Ethereal>text2pcap -t "%d/%m/%Y %H:%M:%S." -l 9 Time.txt Time.pcap
Input from: Time.txt
Output to: Time.pcap

Timecode 
tm_sec=0
 tm_min=0
 tm_hour=0
 tm_mday=1
 Tm_mon=0
 tm_year=70
 tm_wday=0
 tm_yday=0
 Time=22/11/2001 20:03:24.4375

Timecode 
tm_sec=0
 tm_min=0
 tm_hour=0
 tm_mday=1
 Tm_mon=0
 tm_year=70
 tm_wday=0
 tm_yday=0
 Time=10/11/1979 10:13:34.6093

Timecode 
tm_sec=0
 tm_min=0
 tm_hour=0
 tm_mday=1
 Tm_mon=0
 tm_year=70
 tm_wday=0
 tm_yday=0
 Time=12/10/2003 13:13:14.8250
Read 3 potential packets, wrote 0 packets