From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Schroeder Subject: Incorrect clock duration calculation Date: Tue, 7 May 2019 11:07:58 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:40903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNw5E-0008KY-Ln for emacs-orgmode@gnu.org; Tue, 07 May 2019 05:08:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNw55-0004zP-SW for emacs-orgmode@gnu.org; Tue, 07 May 2019 05:08:15 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:37637) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNw55-0004y0-Dt for emacs-orgmode@gnu.org; Tue, 07 May 2019 05:08:11 -0400 Received: by mail-ed1-x52f.google.com with SMTP id w37so17988713edw.4 for ; Tue, 07 May 2019 02:08:10 -0700 (PDT) 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: emacs-orgmode@gnu.org I noticed that on timestamps that begin or end at 00:00 the org mode org-evaluate-time-range function seems to produce wrong results. Here are some examples: For example, this should produce 2:00 duration: CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Fri 00:00] => -22: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 This works though but this does not cross day boundary: CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Fri 23:00] => 1:00 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 Does anyone have a solution for this?