Sept. 22, 2014
5:53 a.m.
* zdump.c (abbr): Don't assume localtime sets tm_isdst to 1 for daylight saving time; any positive value will do. --- zdump.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zdump.c b/zdump.c index 92dd3c1..37a0926 100644 --- a/zdump.c +++ b/zdump.c @@ -926,9 +926,8 @@ abbr(struct tm const *tmp) #ifdef TM_ZONE return tmp->TM_ZONE; #else - return ((0 <= tmp->tm_isdst && tmp->tm_isdst <= 1 - && tzname[tmp->tm_isdst]) - ? tzname[tmp->tm_isdst] + return (0 <= tmp->tm_isdst && tzname[0 < tmp->tm_isdst] + ? tzname[0 < tmp->tm_isdst] : ""); #endif } -- 1.9.3