Morgan Smith <[email protected]> writes: >> 1. One of the tests is failing on my side: >> FAILED test-org-habit/following-days > > TLDR: This is a bug in org-habit. Is there a robust way to add days to > a time object?
One way is directly passing days + disabled DFT to `encode-time'. (I think) > This test takes place on "Sat Oct 17 00:00:00 2009". Then in > `org-habit-insert-consistency-graphs' we run this snippet to add (in the > specific case of the test failure) 20 days: > > `(time-add moment (days-to-time org-habit-following-days))' > > This of course results in a date 20 days in the future of "Thu Nov 5 > 23:00:00 2009". Wait that's not 20 days. That's 19 days and 23 hours. > Oh dear. Looks like DST indeed. > ELISP> (current-time-string > (encode-time > (decoded-time-add > (decode-time 1255752000) > (make-decoded-time :day 20)))) > "Thu Nov 5 23:00:00 2009" > > > I imagine the solution might be in calendar.el? org-agenda often uses `calendar-absolute-from-gregorian' for this. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
