Skip to content

Commit

Permalink
Parse duration without converting to string
Browse files Browse the repository at this point in the history
  • Loading branch information
berlam committed Oct 4, 2019
1 parent b3653d4 commit 6675c48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/jira/v2/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,5 @@ func (effort worklogItem) Comment() pkg.Description {
}

func (effort worklogItem) Duration() time.Duration {
duration, _ := time.ParseDuration(strconv.Itoa(effort.TimeSpentSeconds) + "s")
return duration
return time.Duration(effort.TimeSpentSeconds) * time.Second
}

0 comments on commit 6675c48

Please sign in to comment.