From 4a7a7121063aebe624928640f8b8593d3176e443 Mon Sep 17 00:00:00 2001 From: Blaise Kal Date: Mon, 10 May 2021 22:05:54 +0200 Subject: [PATCH] Commit using rfc date instead of relative days ago --- VERSION | 2 +- git.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 6d7de6e..21e8796 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.2 +1.0.3 diff --git a/git.go b/git.go index f53e986..5ece1db 100644 --- a/git.go +++ b/git.go @@ -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{ @@ -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)