mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix<Statistics>: month to index; fix using UTC time compare to local time
This commit is contained in:
parent
68ddeb4cc5
commit
787fe4ad70
1 changed files with 2 additions and 2 deletions
|
@ -97,7 +97,7 @@ namespace SourceGit.Models {
|
|||
}
|
||||
|
||||
public void AddCommit(string committer, double timestamp) {
|
||||
var time = _utcStart.AddSeconds(timestamp);
|
||||
var time = _utcStart.AddSeconds(timestamp).ToLocalTime();
|
||||
if (time.CompareTo(_thisWeekStart) >= 0 && time.CompareTo(_thisWeekEnd) < 0) {
|
||||
Week.AddCommit((int)time.DayOfWeek, committer);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ namespace SourceGit.Models {
|
|||
Month.AddCommit(time.Day - 1, committer);
|
||||
}
|
||||
|
||||
Year.AddCommit(time.Month, committer);
|
||||
Year.AddCommit(time.Month - 1, committer);
|
||||
}
|
||||
|
||||
public void Complete() {
|
||||
|
|
Loading…
Reference in a new issue