Fix yearly statistics after 64-bit time changes
One of the "+1900" cases got incorrectly dropped. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> [ I really wanted the utc_mkdate/mktime functions to use proper years, rather than the idiotic "offset by 1900". However, we still mix things with "localtime()" in one place, so for now we have to be compatible with the insane tm_year semantics. - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e8578ad9c9
commit
49948e205b
@ -412,7 +412,7 @@ static void process_all_dives(struct dive *dive, struct dive **prev_dive)
|
||||
if (current_year == 0)
|
||||
current_year = tm.tm_year + 1900;
|
||||
|
||||
if (current_year != tm.tm_year) {
|
||||
if (current_year != tm.tm_year + 1900) {
|
||||
current_year = tm.tm_year + 1900;
|
||||
process_dive(dp, &(stats_yearly[++year_iter]));
|
||||
} else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user