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: Wed, 13 Apr 2016 22:48:35 +0600 Message-ID: References: <87shz3cjbo.fsf@web.de> <87a8kxtris.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 1460566164 4286 80.91.229.3 (13 Apr 2016 16:49:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2016 16:49:24 +0000 (UTC) Cc: Emacs mailing list To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 13 18:49:23 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 1aqNyi-00032A-4V for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Apr 2016 18:49:20 +0200 Original-Received: from localhost ([::1]:47270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqNyh-00015a-Ij for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Apr 2016 12:49:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqNyL-00012O-HG for help-gnu-emacs@gnu.org; Wed, 13 Apr 2016 12:48:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqNyK-0007C3-KY for help-gnu-emacs@gnu.org; Wed, 13 Apr 2016 12:48:57 -0400 Original-Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:33756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqNyK-0007Bw-C8 for help-gnu-emacs@gnu.org; Wed, 13 Apr 2016 12:48:56 -0400 Original-Received: by mail-lf0-x232.google.com with SMTP id e190so78157365lfe.0 for ; Wed, 13 Apr 2016 09:48:56 -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=fAby3xaOIIVdjfJahXQasrgXahvB52/MFu37iHnboTs=; b=BinBm09FugqZH2GznD0lGcY+m7Zm2CA5FnLX+FqjAgK5lkxsnU+wmce+bYOTLduxsl ey3M/vjkRlKyF+XipIuQOFlAaeJ7K/y+/po6knhw8hkAcsF2R7MBGdp6IKbBZwM6QYv3 5jWXnJsiz8fKVO3KvsYb5o0AWU/EBfcFNzNDq6+nLQBB3KK+aVEyeAaLwEzhbM+N2WI2 R04vMYjAFY2PUcLafBPH9PSFbE/0/5bV+u9P3IzRVQpm/A9TS9V/tEBukJoOnzQj4P63 hoHE3Bak2on6rlo7zePohob6stZO9E37IOyubrzM69FKar5DvLk15jOJiUkw2BXrUsb3 S93w== 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=fAby3xaOIIVdjfJahXQasrgXahvB52/MFu37iHnboTs=; b=h3NAht53+7mDIroKprkgidZJcfd2FcT2eAuhwxAcFq7qGcJbO+Q9N0LNCgZhyHD/Tn swQPAjZHJaHp6691+7nI898ARjrUPJHggYL1W5FzqBMkF63DUddfuhCxo20vG8EHTiTf O/6gRxxANJLZXUPnxtHJ8wCJG2xogS0gII9QlouJFAKc8ADg5LTtSEwvfLMA4RyJU5Wk jDoKP8QGZeWWzF6l4mz1E5N/evvqriSQcTrpxzLhcobwdwKBQ9DT0MyjRNYfRG3U3tBN +YgaAbV35bMHf51FwFnAFEnt2v/ONmiBghThnkxx/UQCFIXa6yL6PCmk5kKU7nyYPYCk amwQ== X-Gm-Message-State: AOPr4FWBHLbqdbZm6WMLjxT28VeqU2CBic+PqNKhEdixjwU8KmxXfbTlaW7jEnxVGwicsbrgU1QswEMrNlw2xg== X-Received: by 10.112.85.43 with SMTP id e11mr4725233lbz.80.1460566135424; Wed, 13 Apr 2016 09:48:55 -0700 (PDT) Original-Received: by 10.112.172.197 with HTTP; Wed, 13 Apr 2016 09:48:35 -0700 (PDT) In-Reply-To: <87a8kxtris.fsf@web.de> X-Google-Sender-Auth: HWyIoHDyMGx-A6FU6Ao84ASk-4M X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::232 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:109751 Archived-At: On Wed, Apr 13, 2016 at 10:14 PM, Michael Heerdegen wrote: >> 1. Mark the current UTC time, both as a human-readable string and as a >> unixtime value (e.g. on GNU, =E2=80=9Cdate --utc --rfc-3339=3Dseconds=E2= =80=9D and =E2=80=9Cdate >> +%s=E2=80=9D, respectively). >> 2. Make a commit. >> 3. Execute the same command, =E2=80=9Cgit log --pretty=3Dformat:%ad >> --date=3Dformat:%s -n1=E2=80=9D. >> 4. Evaluate (current-time) and convert the first two elements of the >> resulting 4-element list to unixtime. >> 5. Check that the three unixtime values from steps 1, 3 and 4 are >> reasonably close. > > I'm not sure how to do 4. However, 1. and 3. already give me a > difference of ~ 60*60. > > What does this tell us? >From what it looks like, either git or libc are misinformed about your time zone. I was hoping you=E2=80=99d post the actual values you see at each step. I would then independently convert the unixtime into a date and time to see they are sane. Your wall clock reading would be useful too. (current-time) is documented thus in my copy of Emacs 24: Return the current time, as the number of seconds since 1970-01-01 00:0= 0:00. The time is returned as a list of integers (HIGH LOW USEC PSEC). HIGH has the most significant bits of the seconds, while LOW has the least significant 16 bits. USEC and PSEC are the microsecond and picosecond counts. so you take the first element, multiply it by 65536, add the second element= . Example: I just now got this tuple: (22286 29507 190287 275000). 22286 * 65536 + 29507 =3D 1460564803. =E2=80=9Cdate +%s=E2=80=9D says 1460564877 = so my Emacs and the rest of my system agree and it took me just over a minute to do the calculation. >> 6. By the way, which OS are you on? > > uname -a =3D> "Linux drachen 4.4.0-1-amd64 #1 SMP Debian 4.4.6-1 > (2016-03-17) x86_64 GNU/Linux". Mostly Debian testing. Good. What is your $TZ (if any), what does your /etc/timezone contain, and is your tzdata package fresh enough?