Skip to content

Commit 24fc90d

Browse files
committed
fix: adjust commit time to avoid timezone issues on GitHub
1 parent 845821c commit 24fc90d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ func (a *App) GenerateRepo(req GenerateRepoRequest) (*GenerateRepoResponse, erro
342342
stream.WriteString("\n")
343343

344344
// Emit commit that points to README (:1) and activity (:nextMark)
345-
commitTime := parsedDate.Add(time.Duration(i) * time.Second)
345+
// Shift to midday UTC so GitHub won't classify the commit into the previous day across time zones.
346+
commitTime := parsedDate.Add(12*time.Hour + time.Duration(i)*time.Second)
346347
secs := commitTime.Unix()
347348
tz := commitTime.Format("-0700")
348349
msg := fmt.Sprintf("Contribution on %s (%d/%d)", day.Date, i+1, day.Count)

0 commit comments

Comments
 (0)