Ethereal-users: Re: [Ethereal-users] bug in editcap start time and end time? -A -B

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

From: "George P Nychis" <gnychis@xxxxxxx>
Date: Thu, 16 Mar 2006 10:41:51 -0500 (EST)
your script computes the correct values :o
gnychis@monster ~/school/15744/project/logs $ ./test_time.sh 
1: 2006-03-02 02:12:00 -- 1141283520
2: 2006-03-02 02:12:00 -- 1141283520
1: 2006-03-02 02:47:00 -- 1141285620
2: 2006-03-02 02:47:00 -- 1141285620

This now leaves me clueless... the only thing I can think of is that maybe optimization flags in gcc are throwing off strptime when editcap is compiled?

I can try to remove compiler optimizations, rebuild, and retry

Thanks for all your help :)


> It sounds preety odd to me.... why should strptime be yielding two
> diferent timezones for two different calls...
> 
> Even more odd is that on my mac the attached script  yields two different
> TZs but editcap works!
> 
> I'm attaching you a test script (a modification of the last one), if it
> fails it is a plattform problem, you might want to open a bug to the
> distributuion you are using (I'm opening one to apple, this is at least a
> documentation bug) In the meanwhile I'll look for a workarround of this
> issue.
> 
> An interesting test would be to check how the windows version (which uses
> "our own" strptime) works
> 
> On 3/16/06, George P Nychis <gnychis@xxxxxxx> wrote:
>> Sorry for the spam, but i'm trying to help solve this problem...
>> 
>> I debugged editcap.c in gdb and found that it computers starttime and
>> stoptime to the following: 1: starttime = 1141283520 3: stoptime =
>> 1141282020
>> 
>> therefore, your "if (starttime > stoptime)" is true ... so its
>> computing starttime and stoptime incorrectly
>> 
>> timecode for starttime was: 2: timecode = {tm_sec = 0, tm_min = 12,
>> tm_hour = 2, tm_mday = 2, tm_mon = 2,tm_year = 106, tm_wday = 4,
>> tm_yday = 60, tm_isdst = 0, tm_gmtoff = -18000,tm_zone = 0x804d230
>> "EST"}
>> 
>> timecode for stoptime was: 4: timecode = {tm_sec = 0, tm_min = 47,
>> tm_hour = 2, tm_mday = 2, tm_mon = 2,tm_year = 106, tm_wday = 4,
>> tm_yday = 60, tm_isdst = 1, tm_gmtoff = -1209507840,tm_zone = 0x0}
>> 
>> For some reason stoptime does not pick up a timezone which could make
>> the difference... i really am not sure how the times are formed from
>> the format, but i'll keep digging
>> 
>> 
>> 
>>> On another note, if you want to try and kill two birds with one
>>> build... the output if editcap says the format should be: (format as
>>> YYYY-MM-DD hh-mm-ss)
>>> 
>>> however, i believe that it should be:
>>> 
>>> (format as YYYY-MM-DD hh:mm:ss)
>>> 
>>> because: gnychis@monster ~/school/15744/project/logs $ editcap -A 
>>> '2006-03-02 02:12:00' -B '2006-03-02 02:47:00' 
>>> scen1-comcast_to_ini-comcast.log test-start0.log editcap: start time
>>> is after the stop time gnychis@monster ~/school/15744/project/logs $
>>> editcap -A '2006-03-02 02-12-00' -B '2006-03-02 02-47-00' 
>>> scen1-comcast_to_ini-comcast.log test-start0.log editcap: "2006-03-02
>>>  02-12-00" isn't a valid time format
>>> 
>>> 
>>> I don't know if this has anything to do with the other bug... but,
>>> yeah just letting you know :)
>>> 
>>>> patience... it's cooking: http://buildbot.ethereal.com
>>>> 
>>>> 
>>>> On 3/15/06, George P Nychis <gnychis@xxxxxxx> wrote:
>>>>> sorry but how can i get that version, the highest i see is 17632 
>>>>> here:
>>>>> http://www.ethereal.com/distribution/buildbot-builds/source/
>>>>> 
>>>>>> I changed the type on which I stored the time in editcap,
>>>>>> that's in revision 17638 can you try that.
>>>>>> 
>>>>>> Still wondering what could had happened because the time fits
>>>>>> in 31 bits (log(1141285620)/log(2) < 31) and 1141285620 >
>>>>>> 1141283520.
>>>>>> 
>>>>>> L
>>>>>> 
>>>>>> On 3/15/06, George P Nychis <gnychis@xxxxxxx> wrote:
>>>>>>> gnychis@monster ~/school/15744/project/logs $ ./test_time.sh 
>>>>>>> 2006-03-02 02:12:00 -- 1141283520 2006-03-02 02:47:00 -- 
>>>>>>> 1141285620
>>>>>>> 
>>>>>>>> On 3/15/06, George P Nychis <gnychis@xxxxxxx> wrote:
>>>>>>>>> gnychis@monster ~/school/15744/project/logs $ editcap -A 
>>>>>>>>> '2006-03-02 02:12:00' -B '2006-03-02 02:47:00' 
>>>>>>>>> scen1-comcast_to_ini-comcast.log test-start0.log editcap:
>>>>>>>>>  start time is after the stop time
>>>>>>>>> 
>>>>>>>>> My start time doesn't seem to be after the stop time...
>>>>>>>>> 
>>>>>>>> That's odd...
>>>>>>>> 
>>>>>>>> can you run the attached script and give me the output.
>>>>>>>> 
>>>>>>>> -- This information is top security. When you have read it,
>>>>>>>>  destroy yourself. -- Marshall McLuhan
>>>>>> 
>>>>>> 
>>>>>> -- This information is top security. When you have read it,
>>>>>> destroy yourself. -- Marshall McLuhan 
>>>>>> _______________________________________________ Ethereal-users 
>>>>>> mailing list Ethereal-users@xxxxxxxxxxxx 
>>>>>> http://www.ethereal.com/mailman/listinfo/ethereal-users
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> 
>>>>> _______________________________________________ Ethereal-users 
>>>>> mailing list Ethereal-users@xxxxxxxxxxxx 
>>>>> http://www.ethereal.com/mailman/listinfo/ethereal-users
>>>>> 
>>>> 
>>>> 
>>>> -- This information is top security. When you have read it, destroy
>>>>  yourself. -- Marshall McLuhan 
>>>> _______________________________________________ Ethereal-users
>>>> mailing list Ethereal-users@xxxxxxxxxxxx 
>>>> http://www.ethereal.com/mailman/listinfo/ethereal-users
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> 
>>> _______________________________________________ Ethereal-users
>>> mailing list Ethereal-users@xxxxxxxxxxxx 
>>> http://www.ethereal.com/mailman/listinfo/ethereal-users
>>> 
>>> 
>> 
>> 
>> --
>> 
>> _______________________________________________ Ethereal-users mailing
>> list Ethereal-users@xxxxxxxxxxxx 
>> http://www.ethereal.com/mailman/listinfo/ethereal-users
>> 
> 
> 
> -- This information is top security. When you have read it, destroy
> yourself. -- Marshall McLuhan 
> _______________________________________________ Ethereal-users mailing
> list Ethereal-users@xxxxxxxxxxxx 
> http://www.ethereal.com/mailman/listinfo/ethereal-users
> 


--