SimpleMobileTools / Simple-Calendar

A simple calendar with events, tasks, customizable colors, widgets and no ads.
https://www.simplemobiletools.com
GNU General Public License v3.0
3.53k stars 1.15k forks source link

Age incorrect for birthdays before 1970 #1812

Open aberkl opened 2 years ago

aberkl commented 2 years ago
  1. Create Birthday in Simple Contacts i.e. 1960-01-01, verify age is correct
  2. Import into Simple Calendar

Result: Age is incorrect, seems to be calculated from Linux Epoch 1970-01-01

bd1

bd2

llevrel commented 2 years ago

If that may help, I don't see the problem in 6.17.1 (I also don't use Simple Contacts)

Aga-C commented 2 years ago

The problem is only with private contacts from Simple Contacts and also occurs in 6.17.0. It seems to be related to this fragment of code in MainActivity:

                    if (date.year < 70) {
                        date.year = 70
                    }