Skip to content

Commit

Permalink
(fix): use default "when" value (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu authored Jul 20, 2021
1 parent a3e0fb9 commit 334803e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v0.19.2] - 2021-07-20

### Fixed

- `in` and `clone` commands were starting at 0001-01-01 because the default value of the flag was not being read.

## [v0.19.1] - 2021-07-19

### Fixed
Expand Down Expand Up @@ -527,7 +533,9 @@ time entry.
- Golang CLI using [cobra](https://github.com/spf13/cobra)
- Makefile to help setup actions

[Unreleased]: https://github.com/lucassabreu/clockify-cli/compare/v0.19.0...HEAD
[Unreleased]: https://github.com/lucassabreu/clockify-cli/compare/v0.19.2...HEAD
[v0.19.2]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.19.2
[v0.19.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.19.1
[v0.19.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.19.0
[v0.18.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.18.1
[v0.18.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.18.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func fillTimeEntryWithFlags(tei dto.TimeEntryImpl, flags *pflag.FlagSet) (dto.Ti
}

var err error
if changed("when") {
if flags.Lookup("when") != nil {
whenString, _ := flags.GetString("when")
var v time.Time
if v, err = convertToTime(whenString); err != nil {
Expand Down

0 comments on commit 334803e

Please sign in to comment.