From: René Scharfe Date: Thu, 15 Jun 2017 16:12:31 GMT Subject: Re: [PATCH 2/2] date: use localtime() for "-local" time formats Message-ID: In-Reply-To: <20170615135216.2jfsrjpicku6zxv3@sigill.intra.peff.net> Am 15.06.2017 um 15:52 schrieb Jeff King: > But for the special case of the "-local" formats, we can > just skip the adjustment and use localtime() instead of > gmtime(). This makes --date=format-local:%Z work correctly, > showing the local timezone instead of an empty string. Documentation/rev-list-options.txt should be updated to mention that %Z is passed to strftime in the local case, no? > The new test checks the result for "UTC", our default > test-lib value for $TZ. Using something like EST5 might be > more interesting, but the actual zone string is > system-dependent (for instance, on my system it expands to > just EST). Hopefully "UTC" is vanilla enough that every > system treats it the same. > > Signed-off-by: Jeff King > --- > I don't have a Windows system to test this on, but from the output Dscho > provided earlier, I believe this should pass. The first patch applies with some fuzz on master of Git for Windows, the second one applies cleanly. A "typedef unsigned long timestamp_t;" is required to compile it; such a fixup won't be needed for long, I guess. t0006 succeeds. René