Skip to content

Dolphin 7.1.24: Wrong seconds calculation in Duration class>>hours:minutes: #1183

@bernhardkohlhaas

Description

@bernhardkohlhaas

Describe the bug
The result of the evaluation of Duration hours: 1 minutes: 0 is a duration of 2.5 days, instead of 60 minutes.

The bug is in method Duration class>hours:minutes:
Instead of ^self seconds: (hoursNumber * 3600) + minutesNumber * 60,

it should be ^self seconds: (hoursNumber * 3600) + (minutesNumber * 60) that is with parentheses around minutesNumber * 60 (or alternatively something similar to the code in Duration class>>hours:minutes:seconds:)

To Reproduce
Evaluate and display the result of Duration hours: 1 minutes: 0.

Please complete the following information):

  • OS: Windows 10 Pro 21H2
  • Dolphin version 7.1.24 (bug also still present in Dolphin 8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions