[Xastir-Dev] Re: [Xastir] May 4th Tornado Outbreak
Curt Mills, WE7U
hacker at tc.fluke.com
Mon May 5 18:34:07 EDT 2003
On Mon, 5 May 2003, Reuven Z Gevaryahu wrote:
> You're close, but forgot about daylight time. I'm -4 in this season, so
> 052200 should be expiring in 2 minutes. So IMHO it should be on my
> screen. :-P
I'm starting to think there might be another bug in the code... ;-)
At alert.c, line 1402:
// Compute expiration time_t from zulu time
entry.expiration = time_from_aprsstring(entry.activity);
The function time_from_aprsstring() is in util.c. It appears to
check whether we're using zulu time, and if so, does a conversion.
We probably shouldn't do that, right? It seems we need a conversion
only if we're converting a local time string to a time_t, not a GMT
time.
At first glance the code in time_from_aprsstring() appears to be
incorrect. It looks like we're subtracting the offsets from our
expiration time, creating a time_t out of it, and then comparing
that to time_now() for expiration. The end result is that we expire
a few hours too soon or too late depending on the timezone we're in.
Anyone concur?
--
Curt Mills, WE7U hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto: A tax on people who are bad at math!"
"Windows: Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
More information about the Xastir-dev
mailing list