diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2012-09-20 22:13:55 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-20 12:36:48 -0700 |
commit | 49948e205b61fa31e38672f95d08aca8a8a961eb (patch) | |
tree | 25e3737bad26713a3c796504305b27b2300ac4c1 | |
parent | e8578ad9c9709778ec368a604bc7a53bf8757308 (diff) | |
download | subsurface-49948e205b61fa31e38672f95d08aca8a8a961eb.tar.gz |
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>
-rw-r--r-- | statistics.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |