From 49948e205b61fa31e38672f95d08aca8a8a961eb Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Thu, 20 Sep 2012 22:13:55 +0300 Subject: Fix yearly statistics after 64-bit time changes One of the "+1900" cases got incorrectly dropped. Signed-off-by: Miika Turkia [ 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 --- statistics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'statistics.c') diff --git a/statistics.c b/statistics.c index 35b9cecb9..d7757b914 100644 --- a/statistics.c +++ b/statistics.c @@ -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 -- cgit v1.2.3-70-g09d2