mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
Use a reliable source for TZ offset
Both the POSIX and Linux man pages for localtime_r() state that localtime_r need not set the global variable timezone. I found that '\set_clock local' was using an offset of -0500 instead of -0400 (EDT). Change date_strget to use tm_gmtoff.
This commit is contained in:
parent
b667e31dcf
commit
5f6554c797
@ -2834,7 +2834,7 @@ char *date_strget(char *buf, int buflen, int localtime)
|
||||
if (localtime)
|
||||
{
|
||||
mytm = localtime_r(&t, &result);
|
||||
mytimezone = timezone;
|
||||
mytimezone = - (int)result.tm_gmtoff;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user