The following commands work as expected (using commit b06d364310
in the git://git.kernel.org/pub/scm/git/git.git repo as test case):
$ export TZ=Europe/Berlin
$ git --no-pager log -1 --pretty="%ad" --date=iso b06d364310
2017-05-09 23:26:02 +0900
$ git --no-pager log -1 --pretty="%ad" --date=iso-lo
On Fri, May 26, 2017 at 8:33 PM, Ulrich Mueller wrote:
> The following commands work as expected (using commit b06d364310
> in the git://git.kernel.org/pub/scm/git/git.git repo as test case):
>
> $ export TZ=Europe/Berlin
> $ git --no-pager log -1 --pretty="%ad" --date=iso b06d364310
> 2017-05-09
On Sat, May 27, 2017 at 06:57:08PM +0200, Ævar Arnfjörð Bjarmason wrote:
> There's another test which breaks if we just s/gmtime/localtime/g. As
> far as I can tell to make the non-local case work we'd need to do a
> whole dance where we set the TZ variable to e.g. UTC$offset, then call
> strftime
On Sat, May 27, 2017 at 11:46 PM, Jeff King wrote:
> On Sat, May 27, 2017 at 06:57:08PM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> There's another test which breaks if we just s/gmtime/localtime/g. As
>> far as I can tell to make the non-local case work we'd need to do a
>> whole dance where we se
Am 27.05.2017 um 23:46 schrieb Jeff King:
> On Sat, May 27, 2017 at 06:57:08PM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> There's another test which breaks if we just s/gmtime/localtime/g. As
>> far as I can tell to make the non-local case work we'd need to do a
>> whole dance where we set the TZ
Ævar Arnfjörð Bjarmason writes:
>>
>> Here are some links to past explorations:
>>
>> http://public-inbox.org/git/20160208152858.ga17...@sigill.intra.peff.net/
>>
>> http://public-inbox.org/git/87vb2d37ea@web.de/
>
> There's a third and possibly least shitty option that isn't covered in
>
René Scharfe writes:
> Am 27.05.2017 um 23:46 schrieb Jeff King:
>> On Sat, May 27, 2017 at 06:57:08PM +0200, Ævar Arnfjörð Bjarmason wrote:
>>
>>> There's another test which breaks if we just s/gmtime/localtime/g. As
>>> far as I can tell to make the non-local case work we'd need to do a
>>> wh
Am 02.06.2017 um 05:08 schrieb Jeff King:
In theory the solution is:
1. Start using localtime() instead of gmtime() with an adjustment when
we are converting to the local timezone (i.e., format-local). We
should be able to do this portably.
This is easy to do, and it's bett
On Fri, Jun 02, 2017 at 07:25:43PM +0200, René Scharfe wrote:
> Am 02.06.2017 um 05:08 schrieb Jeff King:
> > In theory the solution is:
> >
> >1. Start using localtime() instead of gmtime() with an adjustment when
> > we are converting to the local timezone (i.e., format-local). We
> >
On Fri, Jun 02, 2017 at 11:23:30AM +0900, Junio C Hamano wrote:
> René Scharfe writes:
>
> > Am 27.05.2017 um 23:46 schrieb Jeff King:
> >> On Sat, May 27, 2017 at 06:57:08PM +0200, Ævar Arnfjörð Bjarmason wrote:
> >>
> >>> There's another test which breaks if we just s/gmtime/localtime/g. As
>
> On Fri, 2 Jun 2017, Jeff King wrote:
> On Fri, Jun 02, 2017 at 07:25:43PM +0200, René Scharfe wrote:
>> On Linux "%z %Z" is expanded to "+0200 CEST" for me, while on Windows I
>> get "Mitteleurop▒ische Sommerzeit Mitteleurop▒ische Sommerzeit". (That
>> "▒" is probably supposed to be an "ä".
On Sat, Jun 03, 2017 at 12:04:32AM +0200, Ulrich Mueller wrote:
> Actually, the POSIX definition for %Z continues: "or by no bytes if no
> timezone information exists." So also returning an empty string would
> be compliant (but maybe not very helpful).
> [...]
> I agree that GMT+0200 could be mis
> On Fri, 2 Jun 2017, Jeff King wrote:
> The remaining question is whether we want to care about preserving the
> system %Z for the local-timezone case.
No strong preference here. Maybe go for consistency, and have %Z
always return the same format (either empty, or same as %z). That
would at
On Sat, Jun 03, 2017 at 12:47:59AM +0200, Ulrich Mueller wrote:
> > On Fri, 2 Jun 2017, Jeff King wrote:
>
> > The remaining question is whether we want to care about preserving the
> > system %Z for the local-timezone case.
>
> No strong preference here. Maybe go for consistency, and have %
14 matches
Mail list logo