From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Time zone trouble without time zones being involved Date: Tue, 17 May 2016 21:31:21 +0600 Message-ID: References: <87shz3cjbo.fsf@web.de> <87a8kxtris.fsf@web.de> <87k2k1h1ka.fsf@web.de> <87a8js8oa8.fsf@web.de> <877feu57iq.fsf@web.de> <87posk68b7.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1463499126 20803 80.91.229.3 (17 May 2016 15:32:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 May 2016 15:32:06 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 17 17:32:06 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b2gya-0005FL-L3 for geh-help-gnu-emacs@m.gmane.org; Tue, 17 May 2016 17:32:04 +0200 Original-Received: from localhost ([::1]:51169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2gyW-0002hz-7c for geh-help-gnu-emacs@m.gmane.org; Tue, 17 May 2016 11:32:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2gyJ-0002hf-WF for help-gnu-emacs@gnu.org; Tue, 17 May 2016 11:31:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2gyE-00030r-Ca for help-gnu-emacs@gnu.org; Tue, 17 May 2016 11:31:46 -0400 Original-Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:36428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2gyE-00030m-5V for help-gnu-emacs@gnu.org; Tue, 17 May 2016 11:31:42 -0400 Original-Received: by mail-lf0-x234.google.com with SMTP id u64so8470262lff.3 for ; Tue, 17 May 2016 08:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=ocLpQ58Ca5/UwpeQD38LTmoJ/rTt1g0kEv8H9Fcf4gs=; b=zCh8xFFGj3eGj2RUSDf6SzRXSseJ9qYqoiQ95TiS7kWYf42bPJ5tJumMd7E/4bK+xU JzU0p5J3gD2IO2nGcJKbRV6uWrlB5fWh2M0nVeWgc4g7cfHh8FeW1AvJItsvs7DmDCO1 lZsPAk3V+QrB3D2brBBRCbg91if2WUm27PvAUVWNycBz6IRqhNbWP96lu+lu/Xn83PtZ upOqESdvw8eePC0JycgAUsrdukKhflNthObLtxINWyagKoQYIh++h+lkDlvwdrNnaXLz 9Tun7UrAZlfN2ddfhooTDSXreGC9erC0fCFM/FYVcmaQ67GmvhEt4b/Vza7LH3JPbuwV WPsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=ocLpQ58Ca5/UwpeQD38LTmoJ/rTt1g0kEv8H9Fcf4gs=; b=NyQs5sgBhUdONVt51F1WFwWAwhuVRoBHaUKnQT5lJL4yORpdkZYOO5ziB2OmawpmPy ZrNfbdATEb8LJO107n4ndOXLiSO6O9NOFowd6api33i5lxMqmN/F7RQ6xyNkKFR/gvYx 5jU01by5prRHZphiCJsTG441pLmona5as/VcJAjwbsIPZe2Xxp6kUVLHSPlk5EEEb32Y Py67xqTzSNQxehOBbhI9pd45APF19bIeoGPBESH4oKn4s04QmFut2YGivdmMwcIzws7l h0k+M3IqHgDl3O3bl9fdfu8zSvi18dJQIIc0ElU2ZsJT/CU0Gz7wyybeexXG2K/Zol/y lhcw== X-Gm-Message-State: AOPr4FWXTI4sFa3ZhREyt7Z4pjUTsRtp9CMpoha/Ukv/zkRTXuR4a068wCEotwusa38sMbb+sY3QrdrobX6RnQ== X-Received: by 10.25.218.70 with SMTP id r67mr787927lfg.50.1463499101318; Tue, 17 May 2016 08:31:41 -0700 (PDT) Original-Received: by 10.114.11.161 with HTTP; Tue, 17 May 2016 08:31:21 -0700 (PDT) In-Reply-To: <87posk68b7.fsf@web.de> X-Google-Sender-Auth: b15IwQCNkCMQXUbCbWNQZlHgBLw X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110019 Archived-At: On Tue, May 17, 2016 at 8:57 PM, Michael Heerdegen wrote: > Hmm, I hoped I can do without a shell. > > Do you think the unixtime value as printed in > > git log --pretty=3Dformat:%ad --date=3Draw -n1 > > can be relied on? Can I ignore the printed time zone delta? In my limited testing, the timestamp seems to match the one in the commit. The timestamp identifies the exact moment in universal time when the commit was made. The time zone offset is only stored for the benefit of tools which want to display commit times in their author and committer=E2=80=99s time zones in effect at that moment (which might or mig= ht not coincide with the user=E2=80=99s time zone offset in effect at the time= of viewing). So yes, you can ignore the offset. But you still need something in order to strip it off, either shell or string manipulation. > [BTW, the doc of git-log tells that > > --date=3Draw shows the date in the internal raw Git format %s %z format= . > > but this seems to be a different %s because raw shows a different time] I don=E2=80=99t even think any date arithmetic happens with --date=3Draw. T= he information is already there in the commit data, in this exact format, Git probably only extracts it with string operations.