A colleague of mine has observed a problem similar to what Tim Vale reported with reading timestamps in text2pcap.
I had a look into it. If you don't read the year as part of the timestamp, it defaults to 0 (meaning 1900), which can't be represented by a time_t as returned by mktime(). So mktime() returns an error and the timestamp is ignored. If you do specify the year in your timestamp, it works OK (assuming your timestamp is within +/- 68 years from 1970). You don't need to specify the month or day of month. The quick and dirty fix (patch attached) is to have the year default to 1970. Alternatively, we could initialise the timestamp to the current time and date and then override the parts of the timestamp that the user supplies. regards Hamish -- Hamish Moffatt VK3SB <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Index: text2pcap.c =================================================================== RCS file: /cvsroot/ethereal/text2pcap.c,v retrieving revision 1.10 diff -r1.10 text2pcap.c 655a656 > timecode.tm_year = 70;
