There are two important variables, unixtime and powerontime. unixtime is supposed to be when the empeg was booted in seconds since the epoch. powerontime is the cumulative number of seconds that the empeg has been on for at the exact moment it was booted.

It does this to calculate the new powerontime value at power fail:

new_powerontime = (current_time - unixtime) + old_powerontime

The problem is that unixtime is never set on a Mk2+ and you're getting this instead:

new_powerontime = current_time + old_powerontime

So on each powerfail, you'll increase powerontime by about 946080000.

Hopefully this is a better explanation than my first attempt!