Skip to content

Commit

Permalink
Commit using rfc date instead of relative days ago
Browse files Browse the repository at this point in the history
  • Loading branch information
blaise-io committed May 10, 2021
1 parent 9e372de commit 4a7a712
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2
1.0.3
3 changes: 1 addition & 2 deletions git.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func markdownStr(pixelChrs string, ncommits int) string {
}

func commit(dir string, daysAgo int) error {
date := fmt.Sprintf("%d days ago noon", daysAgo)
date := time.Now().AddDate(0, 0, -daysAgo).Format(time.RFC3339)
return commands(dir,
[]string{"git", "add", "."},
[]string{
Expand All @@ -171,7 +171,6 @@ func commit(dir string, daysAgo int) error {
func command(dir string, name string, arg ...string) error {
cmd := exec.Command(name, arg...)
cmd.Dir = dir
cmd.Env = append(os.Environ(), "TZ=UTC")

response, err := cmd.CombinedOutput()
responseStr := string(response)
Expand Down

0 comments on commit 4a7a712

Please sign in to comment.