X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Ftime%2Fstrftime.c;h=d16e81343891dc15159bd69f8d63a7d58d61c4b3;hp=576870589c1a71edeb0fc612e15b22cd35366a8c;hb=1cc81f5cb0df2b66a795ff0c26d7bbc4d16e13c6;hpb=f1292e3d28309bbc81f61671164843cec4319bfa diff --git a/src/time/strftime.c b/src/time/strftime.c index 57687058..d16e8134 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -3,7 +3,6 @@ #include #include #include -#include "__time.h" // FIXME: integer overflows @@ -182,14 +181,11 @@ do_fmt: fmt = "%04d"; goto number; case 'z': - if (tm->tm_isdst < 0) continue; - val = -__timezone - (tm->tm_isdst ? __dst_offset : 0); + val = -tm->__tm_gmtoff; l += snprintf(s+l, n-l, "%+.2d%.2d", val/3600, abs(val%3600)/60); continue; case 'Z': - if (tm->tm_isdst < 0 || !__tzname[0] || !__tzname[0][0]) - continue; - l += snprintf(s+l, n-l, "%s", __tzname[!!tm->tm_isdst]); + l += snprintf(s+l, n-l, "%s", tm->__tm_zone); continue; default: return 0;