nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3.04k stars 134 forks source link

Agenda: Date ranges are not properly calculated when it overlaps DST changes #538

Closed Maltimore closed 1 year ago

Maltimore commented 1 year ago

Describe the bug

If you have a multi week event, the calculation which day of the even it it at a given day is off.

Steps to reproduce

Consider the following file

* multi week event
<2023-03-26 Sun>--<2023-04-03 Mon>

This leads to the following three views in the agenda (week-view):

Here it says 1/8

Week-agenda (W12):
Montag     20 März 2023
Dienstag   21 März 2023
Mittwoch   22 März 2023
Donnerstag 23 März 2023
Freitag    24 März 2023
Samstag    25 März 2023
Sonntag    26 März 2023
  a:          (1/8): multi week event

Here it starts again at 1/8:

Week-agenda (W13):
Montag     27 März 2023
  a:          (1/8): multi week event
Dienstag   28 März 2023
  a:          (2/8): multi week event
Mittwoch   29 März 2023
  a:          (3/8): multi week event
Donnerstag 30 März 2023
  a:          (4/8): multi week event
Freitag    31 März 2023
  a:          (5/8): multi week event
Samstag    01 April 2023
  a:          (6/8): multi week event
Sonntag    02 April 2023
  a:          (7/8): multi week event

and here it says 9/9

Week-agenda (W14):
Montag     03 April 2023
  a:          (9/9): multi week event
Dienstag   04 April 2023
Mittwoch   05 April 2023
Donnerstag 06 April 2023
Freitag    07 April 2023
Samstag    08 April 2023
Sonntag    09 April 2023

Expected behavior

In the first week it should say, 1/9, in the second week it should say 2/9, 3/9... and in the third week it should say 9/9

Emacs functionality

No response

Minimal init.lua

Minimal init provided by nvim-orgmode.

Screenshots and recordings

No response

OS / Distro

Ubuntu 22.04

Neovim version/commit

master

Additional context

No response

jgollenz commented 1 year ago

Can confirm this. Leave a message if you'd like to look into it yourself :slightly_smiling_face:

Maltimore commented 1 year ago

No, go ahead please! :) I'm too busy right now unfortunately.

jgollenz commented 1 year ago

Hm, it works when it's in the future: <2023-04-02 Sun>--<2023-04-10 Mon>. It varies a bit, but it stays broken when the start of the range is in the past. It works today (Monday), but was broken yesterday (Sunday). Strange

kristijanhusak commented 1 year ago

Might be a DST issue. We are not handling any of that.

kristijanhusak commented 1 year ago

@Maltimore can you check if everything works fine now, since DST changes are behind us ? I just want to confirm where's the bug.

Maltimore commented 1 year ago

Everything works fine now. I guess you're right about the DST then!