From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julius Dittmar Subject: Re: Incorrect clock duration calculation Date: Tue, 7 May 2019 16:02:03 +0200 Message-ID: <5b44a8f1-40ae-67d0-4b31-b78c44499849@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:41483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO0fZ-0003va-I2 for emacs-orgmode@gnu.org; Tue, 07 May 2019 10:02:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO0fY-0007MD-I6 for emacs-orgmode@gnu.org; Tue, 07 May 2019 10:02:09 -0400 Received: from mout.gmx.net ([212.227.15.15]:43381) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hO0fY-0007JQ-4L for emacs-orgmode@gnu.org; Tue, 07 May 2019 10:02:08 -0400 Received: from [192.168.175.209] ([87.139.53.30]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MysVs-1gTJD445n0-00vuLc for ; Tue, 07 May 2019 16:02:05 +0200 In-Reply-To: Content-Language: de-DE 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 Hi, Am 07.05.19 um 11:07 schrieb Martin Schroeder: > 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] =3D> -22:00 > I tried this, but id did not work either: > CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Sat 00:00] =3D> -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] =3D> 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] =3D> -21:00 > > Does anyone have a solution for this? They are all correct: The date part is the same for the first and second timestamp. HTH, Julius