[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Everyone, please stop making my life more difficult

From: David Kastrup
Subject: Re: Everyone, please stop making my life more difficult
Date: Fri, 12 Sep 2014 15:57:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: David Kastrup <address@hidden>
>> Date: Fri, 12 Sep 2014 15:19:35 +0200
>> Eli Zaretskii <address@hidden> writes:
>> >> Date: Fri, 12 Sep 2014 12:49:29 +0200
>> >> From: Gregor Zattler <address@hidden>
>> >> 
>> >> echo $(date -u --rfc-3339=seconds -d "$(git log -1 --pretty='%ci'
>> >> ${1})"|sed -e 's/ /T/' -e 's/+00:00//')Z$(git log -1 --pretty='!%ce'
>> >> "${1}")
>> >
>> > I'm pretty shocked that Git doesn't provide a way to show times in
>> > UTC.
>> TZ=UTC git log --date=local ...
> Thanks, but that's not exactly Git provided option (and is
> non-portable).

Of course the format %ct is in UTC.  It's just the raw number.

For formatting times, POSIX provides/prescribes strftime.  All the
formats in strftime are in local time with the exception of %s (the raw
second number in UTC), %z (the numeric timezone) and %Z (the timezone

Git does offer the --date=raw option that will produce the ilk of

commit 85e17384aceddcb761f48f95ee2244a60f9e8408
Author: David Kastrup <address@hidden>
Date:   1410511700 +0200

    Let Lyric_combine_music_iterator use SyllableEvent

I am somewhat surprised that you should state that setting TZ to UTC is
not going to be portable.  Why?

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]