Skip to content
Snippets Groups Projects

[#94] Store deltas inseconds instead of parsing to minutes

Closed [#94] Store deltas inseconds instead of parsing to minutes
Closed Dirk HOFFMANN requested to merge bug/#94_fix-activity-sum into develop

Created by: ghost

Activity delta (duration) are received from dbus in a seconds format, instead to parsing them to minutes then compiling them to make the today-summary. We keep them in seconds all the time for more precision.

The time formatting functions have also been rewrite to use seconds instead minutes and to have a cleaner approach using Date() objects and round().

Closes: #94 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: CLAassistant

    CLA assistant check
    All committers have signed the CLA.

  • Created by: elbenfreund

    I think the general idea and impetus of this PR is correct. However, Using Date is suboptimal itself. Whilst unlikely it will for sure fail for facts that last longer than 24 hours. But even without that, it would be just a different kind of hackish solution that disguises the simple fact that javascript lacks a decent way to handle timedeltas entirely, like so many things.

    Instead of pretending otherwise we should focus of cleaning up the formating functions as they are and make their use as transparent as possible. One thing that I agree with entirely is abandoning the unwarranted conversion to minutes when retrieving the dbus fact.

    In total, I will close this PR in favour of the alternative #201 I hope that is alright with you.

Please register or sign in to reply
Loading