Re: [O] Incorrect clock duration calculation

2019-05-07 Thread Thomas Plass
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





Re: [O] Incorrect clock duration calculation

2019-05-07 Thread Jude DaShiell
Duration must not endure for more than 24 hours since that's
unendoreable.

On Tue, 7 May 2019, Martin Schroeder wrote:

> Date: Tue, 7 May 2019 05:07:58
> From: Martin Schroeder 
> To: emacs-orgmode@gnu.org
> Subject: [O] Incorrect clock duration calculation
>
> 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?
>
>

-- 




Re: [O] Incorrect clock duration calculation

2019-05-07 Thread Julius Dittmar
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] => -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?

They are all correct: The date part is the same for the first and second
timestamp.

HTH,
Julius



[O] Incorrect clock duration calculation

2019-05-07 Thread 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] => -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?