From: "René Scharfe" <l.s.r@web.de>
To: Jeff King <peff@peff.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: rs/strbuf-addftime-zZ, was Re: What's cooking in git.git (Jun 2017, #04; Tue, 13)
Date: Wed, 14 Jun 2017 21:36:38 +0200 [thread overview]
Message-ID: <e9260c40-c49f-d7f6-70c2-a28c1b3104a2@web.de> (raw)
In-Reply-To: <20170614111043.xlfsgclbyrqektb3@sigill.intra.peff.net>
Am 14.06.2017 um 13:10 schrieb Jeff King:
> On Wed, Jun 14, 2017 at 12:57:06PM +0200, Johannes Schindelin wrote:
>> But even then, it fails in t0006 on Windows with this error:
>>
>> -- snip --
>> ++ eval 'diff -u "$@" '
>> +++ diff -u expect actual
>> --- expect 2017-06-14 10:53:40.126136900 +0000
>> +++ actual 2017-06-14 10:53:40.171146800 +0000
>> @@ -1 +1 @@
>> -1466000000 +0200 -> 2016-06-15 14:13:20 +0000 (UTC)
>> +1466000000 +0200 -> 2016-06-15 14:13:20 UTC (UTC)
>
> Ugh, I was worried about that some systems might display timezones
> differently (that's why I _didn't_ check %Z in the EST5 case). But I
> must admit this was not an incompatibility I was expecting. It looks
> like your system strftime() turns %z into "UTC". POSIX says:
>
> %z
> Replaced by the offset from UTC in the ISO 8601:2000 standard format
> (+hhmm or -hhmm), or by no characters if no timezone is
> determinable.
>
> So it seems like the mingw strftime is violating POSIX. I don't see an
> easy solution beyond marking this as !MINGW. Though if we wanted a
> partial test, we could test %z and %Z separately.
Hmm. The patches currently either let strftime handle both %z and %Z
(in the local case) or handle both internally. Perhaps we need a third
option, namely to handle %z internally in all cases for systems whose
implementation violates POSIX? Nah, it would be easier to always handle
%z internally. Any downsides? Does someone actually expect %z to show
time zone names instead of offsets on Windows?
René
next prev parent reply other threads:[~2017-06-14 19:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 21:40 What's cooking in git.git (Jun 2017, #04; Tue, 13) Junio C Hamano
2017-06-14 0:52 ` Jonathan Nieder
2017-06-15 15:54 ` Junio C Hamano
2017-06-14 7:42 ` Lars Schneider
2017-06-14 18:38 ` Torsten Bögershausen
2017-06-14 10:57 ` rs/strbuf-addftime-zZ, was " Johannes Schindelin
2017-06-14 11:10 ` Jeff King
2017-06-14 19:36 ` René Scharfe [this message]
2017-06-14 21:04 ` Johannes Schindelin
2017-06-14 23:03 ` René Scharfe
2017-06-15 5:42 ` Jeff King
2017-06-15 8:46 ` René Scharfe
2017-06-14 18:23 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9260c40-c49f-d7f6-70c2-a28c1b3104a2@web.de \
--to=l.s.r@web.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).