From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marcelo Toledo Newsgroups: gmane.emacs.devel Subject: format-time-string bug Date: Mon, 12 Apr 2004 21:54:34 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87zn9g3an9.fsf@kali.intranet> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1081819731 19033 80.91.224.253 (13 Apr 2004 01:28:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Apr 2004 01:28:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 13 03:28:40 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BDCjA-0004XG-00 for ; Tue, 13 Apr 2004 03:28:40 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BDCjA-00006K-00 for ; Tue, 13 Apr 2004 03:28:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BDCeG-0003wx-Mt for emacs-devel@quimby.gnus.org; Mon, 12 Apr 2004 21:23:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BDCRH-00026A-Qi for emacs-devel@gnu.org; Mon, 12 Apr 2004 21:10:11 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BDCQf-0001xu-KK for emacs-devel@gnu.org; Mon, 12 Apr 2004 21:10:05 -0400 Original-Received: from [200.213.197.161] (helo=hm61.locaweb.com.br) by monty-python.gnu.org with smtp (Exim 4.30) id 1BDCMM-0001Nw-TM for emacs-devel@gnu.org; Mon, 12 Apr 2004 21:05:07 -0400 Original-Received: (qmail 24361 invoked from network); 13 Apr 2004 01:04:58 -0000 Original-Received: from unknown (10.1.10.10) by hm61.locaweb.com.br with QMTP; 13 Apr 2004 01:04:58 -0000 Original-Received: (qmail 32307 invoked from network); 13 Apr 2004 01:05:04 -0000 Original-Received: from unknown (HELO kali.intranet.marcelotoledo.org) (marcelo@marcelotoledo.org@200.164.19.54) by hm10.locaweb.com.br with SMTP; 13 Apr 2004 01:05:04 -0000 Original-To: emacs-devel@gnu.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUREBKVenaCZF94VlBp TEhXPzzH0uJJMS+5w9gzIiKEqtMzAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAA AAd0SU1FB9MGCwAYJycum7IAAAH+SURBVHjavVO5bttAECUCGMGWOwICtTtL5Si1s4ThLuBRuEwk gfEPCCptwQHBUh3LRWiC2L/NLGNHqyNtCJDFPL735kyS//mIf8Z94q4BToirJDe9FxThJoYX4oqD F975Sxc/Nq33/vx/kQzr0lZVfUHxa4Na26o+A8TPghCRys0ZZdgYRECylTsDVoRKgaasPVUaC6OU VKz14E5KGRiQUuq6aWMtEQCOQ72mVsQmbqjKfC6BU749YYhmbNashWmZPbqvEcPniBynuirbIYu0 RtRkkLCydP8rjxgvtMk1EaDRVa8jk5esYiDj8jF7AhcBlsDmtpiAiPE4EBoys5xrsc/pEfjSk0a9 BOIqF/3iCNCzQTlTklOWdv/pCHyz3CoA0AykT3dHYH/LrQKjtJGg48a/mwCUQAhpEwE3C84HlZyR AV3Hg6KcDTgnWPJM4r7vC+Bcu0MA1jEgeim57aEQvToZ+w0bsAmPXRdtPPX3y8ldKm3pgSf3F3N5 KFsB75a5c7wF7u04egW8QBwnzHjx3ygiGZUKnUJjIPXJtKhMY64g/AMg6Kr+cYBXCydW3GCWCp8y nXeHcHguHN8+rDuGzCDV3bybnINaH1QgLCqg6rouxFkocaPiQwhxNvq8YyAkxqfpfNh3fuZM+bjb 7kJmju/Yie+v/x+k/LDddr8BShKMrI4evB8AAAAASUVORK5CYII= User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21547 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21547 A few days ago I was coding something related to time, then I needed to use the function `format-time-string´ and the code above shows what I have found wrong: (setq t1 (current-time)) (sleep-for 3) (setq t2 (current-time)) (format-time-string "(%H:%M:%S)" (time-subtract t2 t1)) the result of the last expression should be something near 00:00:03. For me it is appearing 20:00:03. For other people it's appearing diferent values but never what I am really expecting. Could someone please try? time-substract is returning the correct value, in this case something near (0 3). The data format is a list of 3 integers. The first has the most significant 16 bits of the seconds, while the second has the least significant 16 bits. The third integer gives the microsecond count. I didn't have time to identify witch function is bugged yet, but, if someone more experienced could identify what is wrong, would be nice. -- Marcelo Toledo marcelo@marcelotoledo.org http://www.marcelotoledo.org Mobile: 55 71 9141-7181