[Xastir-Dev] Unix time function expert?
Curt Mills
hacker at tc.fluke.com
Wed Jun 25 12:41:47 EDT 2003
On Wed, 25 Jun 2003, Curt Mills wrote:
> Who knows a bit about Unix time functions?
>
> It appears that the "TZ" variable is not set on Cygwin, and the
> "localtime" link is not made in /etc either.
>
> For these reasons, and perhaps lack of a "tzset()" call at the
> proper place, the time functions on Cygwin appear to be defaulting
> to UTC instead of local time. This causes weather alerts to expire
> at the wrong times on Cygwin. Weather alert expiration appears to
> be correct on Linux.
>
> If someone could check this out and figure out the proper fixes,
> it'd be appreciated. I suspect it might involve adding "tzset()"
> and then tweaking the README.win32 file to add instructions for
> setting the TZ variable.
>
> The interesting code is in util.c:time_from_aprsstring(). Perhaps
> other places as well, like gps.c.
>
> There's a bug report for this on SourceForge.
Forgot to mention: The Cygwin FAQ mentions that a lack of "tzset()"
causes time to be off on Cygwin. That's what led me in that
direction:
"Why isn't _timezone set correctly?
----------------------------------
*(Please note: This section has not yet been updated for the
latest net release.)*
Did you explicitly call tzset() before checking the value of
_timezone? If not, you must do so."
--
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