Skip to content

Commit

Permalink
use time.TimeOnly for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Feb 16, 2024
1 parent b5f5b41 commit ffaca5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func avsSyncMain(cliCtx *cli.Context) error {
sleepBeforeFirstSyncDuration = 0 * time.Second
} else {
now := time.Now()
firstSyncTime, err := time.Parse("15:04:05", firstSyncTimeStr)
firstSyncTime, err := time.Parse(time.TimeOnly, firstSyncTimeStr)
firstSyncTime = time.Date(now.Year(), now.Month(), now.Day(), firstSyncTime.Hour(), firstSyncTime.Minute(), firstSyncTime.Second(), 0, now.Location())
if err != nil {
return err
Expand Down

0 comments on commit ffaca5c

Please sign in to comment.