From mboxrd@z Thu Jan 1 00:00:00 1970 From: thunk2@arcor.de (Thomas Plass) Subject: Re: Incorrect clock duration calculation Date: Tue, 7 May 2019 21:30:08 +0200 Message-ID: <23761.56512.441516.349535@AGAME7.local> References: Reply-To: Thomas Plass Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:57584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO5nI-00076j-9C for emacs-orgmode@gnu.org; Tue, 07 May 2019 15:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO5nH-0003rp-7j for emacs-orgmode@gnu.org; Tue, 07 May 2019 15:30:28 -0400 Received: from mx009.vodafonemail.xion.oxcs.net ([153.92.174.39]:45145) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hO5nG-0003jA-RE for emacs-orgmode@gnu.org; Tue, 07 May 2019 15:30:27 -0400 In-Reply-To: Your message of Tuesday, May 7 2019 11:07:58 (ID: ). List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Martin Schroeder Cc: emacs-orgmode@gnu.org Note that the day starts at 00:00 and ends at 24:00. So: Martin Schroeder wrote at 11:07 on May 7, 2019: : For example, this should produce 2:00 duration: : CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Fri 00:00] => -22:00 It will if you change [2019-04-19 Fri 00:00] to [2019-04-19 Fri 24:00]. : I tried this, but id did not work either: : CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Sat 00:00] => -22:00 Day name abbreviations ("Fri", "Sat") in timestamps are really for human consumption. Org doesn't attach a lot of meaning to them. Hell, since they use a setting from `calendar', they are subject to localisation. Note that [2019-04-19 00:00] [2019-04-19 Sa 00:00] [2019-04-19 Sat 00:00] [2019-04-19 fooble 00:00] work the same as Org is agnostic about the non-whitespace string between the date and the time (as long as it doesn't contain whitespace itself). : This should produce 3:00 but it gives -21 even though the end time is : later than start time: : CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Sat 01:00] => -21:00 No, the end time preceeds the start time. The encoded duration starts at 1am and ends at 10pm on the same day. If you want to cross day boundaries then the dates must be different in the timestamps. "2019-04-20" is what you want in the second one: CLOCK: [2019-04-19 Fri 22:00]--[2019-04-20 Sat 01:00] => 3:00 Regards, Thomas