Here is my code to achieve this.
Here I am considering time1 < time2, and the number of days in feb month is 29, for exact number of day in feb month you have to do some calculation based on the year.
#include <stdio.h>
int main()
{
int time1[6] = {55, 59, 12, 3, 6, 1980};
int time2[6] = {56, 23, 23, 7, 2, 2014};
int no_day_in_month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int tmp[6];
int i;
for (i = 0; i < 6; i++) {
if (time1[i] > time2[i]) {
switch (i) {
case 0:
case 1:
time2[i] += 60;
time2[i+1] -= 1;
break;
case 2:
time2[i] += 24;
time2[i+1] -= 1;
break;
case 3:
time2[i] += no_day_in_month[time2[i+1]];
time2[i+1] -= 1;
break;
case 4:
time2[i] += 12;
time2[i+1] -= 1;
break;
}
}
tmp[i] = time2[i] - time1[i];
}
for (i = 0; i < 6; i++)
printf("%d\n", tmp[i]);
return 0;
}