Version: 1.5.0 (using Devel)
When I open an album property and try to set the album date to a mean date of all picture inside and picture are before 1970 I always obtain the date: 07/02/2106
If I try to set the album date by clicking on the most recent or the older, the date is setted right
If I try to set the date by clicking on the mean date and picture inside is from 1970 and above, the date is set roght
Steps to Reproduce:
1 create an album
2 put a picture with date before 1970 (ie 01/01/1969)
3 open the album property
4 set the date by clicking on the mean date
5 look at the 07/02/2106 date obtained
07/02/2106 is obtained
01/01/1969 should be obtained
Interesting problem. Obviously, the Unix Epoch does have its weaknesses ;-)
Can you provide such a picture for testing? I would like to see where it works and where things break.
Seems to be an variable overflow/negative sign fault
Created attachment 53430 [details]
Picture tagged from 1910-05-28
SVN commit 1217733 by mwiesweg:
Do not use time_t when calculating average date, that works only on a limited scale.
Use QDate's Julian Day to get a much wider range.
M +2 -1 NEWS
M +10 -21 libs/database/albumdb.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1217733