From: René Scharfe Date: Sat, 03 Jun 2017 16:20:17 GMT Subject: Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself Message-ID: <52a998be-edbc-e8fb-afa9-e0c7ab682425@web.de> In-Reply-To: <22834.46566.700197.257204@a1i15.kph.uni-mainz.de> Am 03.06.2017 um 15:13 schrieb Ulrich Mueller: >>>>>> On Sat, 3 Jun 2017, René Scharfe wrote: > >> + case 'Z': >> + strbuf_addstr(&munged_fmt, tz_name); > > Is it guaranteed that tz_name cannot contain a percent sign itself? Currently yes, because the only caller passes an empty string. The fact that tz_name is subject to expansion by strftime could be mentioned explicitly in strbuf.h. I'm not sure if that's a desirable property, but it allows callers to expand %z internally and %Z using strftime. René