Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Open the stats window at midnight on its first day
Diffstat (limited to 'source')
| -rw-r--r-- | source/ui-stats.c | 4 |
1 file changed, 4 insertions, 0 deletions
diff --git a/source/ui-stats.c b/source/ui-stats.c index e4dcf8e..6cb2653 100644 --- a/source/ui-stats.c +++ b/source/ui-stats.c @@ -162,6 +162,10 @@ static void window_start(const struct cgit_period *period, struct tm *tm) time(&now); gmtime_r(&now, tm); period->trunc(tm); + // The window opens at midnight, not at the time of day it is now. + tm->tm_hour = 0; + tm->tm_min = 0; + tm->tm_sec = 0; for (i = 1; i < period->count; i++) period->dec(tm); } |
