diff options
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1697,7 +1697,10 @@ localtime_with_gmtoff_zone(const time_t *t, struct tm *result, long *gmtoff, con if (zone) { #if defined(HAVE_TM_ZONE) - *zone = zone_str(tm.tm_zone); + if (tm.tm_zone) + *zone = zone_str(tm.tm_zone); + else + *zone = zone_str("(NO-TIMEZONE-ABBREVIATION)"); #elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT) /* this needs tzset or localtime, instead of localtime_r */ *zone = zone_str(tzname[daylight && tm.tm_isdst]); |