Comments (10)
Interesting. I copied your clock entries to one of my headings and it seems to work as expected.
09:35 | 54m | 1h 0m | xxx | xxx
12:54 | 3h 37m | 3h 30m | xxx | xxx
First thing that came to my mind would be the locale-specific settings. Would you be able to test with an english locale?
from ejira.
I switched my sytem from german to english (which also updated the locale
fields and the current-language-environment
values) but it didn't change anything. This seems to indicate a bug in the emacs version, I'll try to get the "official" version going and see if that changes anything.
from ejira.
I am running from the master branch.
If you evaluate (ejira-hourmarking--get-entries "2020-10-27")
and check the :start and :end -properties of one of the entries that you are seeing as negative, and give those to time-subtract
(like: (time-subtract '(24471 55884) '(24471 52644))
) does it give you a negative value?
from ejira.
It actually doesn't. The log [2020-10-27 Di 07:50]--[2020-10-27 Di 08:29] => 0:39
results in 07:50 | -21m | -15m
and the following time entries: (:start (24471 49944) :start-r (24471 49944) :end (24471 52284) :duration -1260 :duration-r -900)
. (time-subtract '(24471 52284) '(24471 49944))
result in 2340
. Maybe they are used in the wrong order for some reason? start-end
instead of end-start
from ejira.
Could you check what does ejira-hourmarking-round
return for the following cases:
(ejira-hourmarking-round '(24471 52284) 1)
(ejira-hourmarking-round '(24471 52284) 15)
For me I get:
26940 (#o64474, #x693c)
27000 (#o64570, #x6978)
Trying to narrow down the location where the values go wild.
from ejira.
I got
23340 (#o55454, #x5b2c)
23400 (#o55550, #x5b68)
from ejira.
I changed my system time zone which seems to affect the values here.
Using London gave me
19740 (#o46434, #x4d1c)
19800 (#o46530, #x4d58)
Not sure if this helps
from ejira.
Found the issue:
(defun ejira-hourmarking-round (time round-by)
"Round TIME to nearest ROUND-BY."
;; Account for stupid time zone issues.
(let* ((hours (- (string-to-number (format-time-string "%H" time)) 2))
(minutes (string-to-number (format-time-string "%M" time)))
(total (+ (* 60 hours) minutes))
(rounded (round total round-by))
(hours-r (/ rounded (/ 60 round-by)))
(minutes-r (* round-by (% rounded (/ 60 round-by)))))
(+ (* 3600 hours-r) (* 60 minutes-r))))
See the - 2 and the comment ;; Account for stupid time zone issues.
... Probably not the right place to fix it... Before I can come up with a proper fix adjusting that number 2 there is going to solve the issue for you 😄
from ejira.
Yes, this does the trick. I changed it to a 1 and everything is correct now. Thank you for your time and help, I really appreciate it.
from ejira.
I experienced the same (also in the mid european time zone).
For me the offset in ejira-hourmarking-round
is 2 (probably because of daylight saving time? ) and hardcoding it to 1 fixed it.
from ejira.
Related Issues (20)
- ejira-progress-issue fields for code review
- verbatim text (curly braces) HOT 4
- Having trouble logging in HOT 1
- ejira does not appear to be published anywhere HOT 3
- Working on issues with multiple users HOT 4
- I can unassign an issue but I can't assign it to a user or myself HOT 14
- wrong-type-argument stringp replace-regexp-in-string (at ejira--parse-sprint) HOT 20
- Feature: add "open in external browser" method HOT 4
- Issues moved between projects show up in both projects
- `Update-my-projects` doesn't get all issues for very large projects
- ejira-update-my-projects not working HOT 1
- update-my-projects fails on first run HOT 2
- ejira-heading-to-task return errors HOT 1
- Add {noformat} to parser HOT 2
- Team-managed projects lack Epic Links etc
- How to use with Jira cloud HOT 4
- `ejira-update-my-projects` should be asynchronous HOT 1
- Does ejira has plan to host on melpa?
- (invalid-function #<buffer AAA.org>) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ejira.