Skip to content

Commit 4a7a712

Browse files
committed
Commit using rfc date instead of relative days ago
1 parent 9e372de commit 4a7a712

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.2
1+
1.0.3

git.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func markdownStr(pixelChrs string, ncommits int) string {
155155
}
156156

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

176175
response, err := cmd.CombinedOutput()
177176
responseStr := string(response)

0 commit comments

Comments
 (0)