Skip to content

Commit

Permalink
Merge branch 'master' into feature/code-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jzyinq committed Mar 29, 2024
2 parents cda69c7 + dace444 commit 0cb638b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [0.5.4] - 2024-03-29
### Fixed
- MonthRange function returned first day of next month which causes invalid summaries

## [0.5.3] - 2024-03-27
### Fixed
- calendar controls not working while focus is on latest issues view
Expand Down Expand Up @@ -85,7 +89,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added
- Initial release of gojira

[Unreleased]: https://github.com/jzyinq/gojira/compare/0.5.3...master
[Unreleased]: https://github.com/jzyinq/gojira/compare/0.5.4...master
[0.5.4]: https://github.com/jzyinq/gojira/compare/0.5.3...0.5.4
[0.5.3]: https://github.com/jzyinq/gojira/compare/0.5.2...0.5.3
[0.5.2]: https://github.com/jzyinq/gojira/compare/0.5.1...0.5.2
[0.5.1]: https://github.com/jzyinq/gojira/compare/0.5.0...0.5.1
Expand Down
4 changes: 2 additions & 2 deletions gojira/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ func OpenURL(url string) {

func MonthRange(t *time.Time) (time.Time, time.Time) {
firstDayOfCurrentMonth := time.Date(t.Year(), t.Month(), 1, 0, 0, 0, 0, t.Location())
firstDayOfNextMonth := firstDayOfCurrentMonth.AddDate(0, 1, 0)
return firstDayOfCurrentMonth, firstDayOfNextMonth
lastDayOfCurrentMonth := firstDayOfCurrentMonth.AddDate(0, 1, 0).Add(-time.Second)
return firstDayOfCurrentMonth, lastDayOfCurrentMonth
}
2 changes: 1 addition & 1 deletion gojira/worklog.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (wl *Worklogs) TotalTimeSpentToPresentDay() int {
if err != nil {
logrus.Error(err)
}
if logDate.Before(time.Now().Local()) {
if logDate.Before(time.Now().UTC()) {
totalTime += log.TimeSpentSeconds
}
}
Expand Down

0 comments on commit 0cb638b

Please sign in to comment.