opuntiaOS-Project/opuntiaOS

[kernel] Wrong month in Time Manager

Closed this issue · 1 comments

Hi

Correct me if i'm wrong

This 31 + 28 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 + 30 + 31 represents months, right?

So if yes, it should be 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 right (from L28 to L34)?

static uint32_t pref_sum_of_days_in_mounts[] = {
0,
31,
31 + 28, // the code that use that should add +1 autmoatically for a leap year
31 + 28 + 31,
31 + 28 + 31 + 30,
31 + 28 + 31 + 30 + 31,
31 + 28 + 31 + 30 + 31 + 31,
31 + 28 + 31 + 30 + 31 + 31 + 30,
31 + 28 + 31 + 30 + 31 + 31 + 30 + 31,
31 + 28 + 31 + 30 + 31 + 31 + 30 + 31 + 30,
31 + 28 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31,
31 + 28 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 + 30,
31 + 28 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 + 30 + 31,
};

Regards

Hey, yeah, looks like you are right.