Hello!

I have a problem with my arduino, calculating numbers.

I am trying to count the number of seconds passed since 00:00..

unsigned long secondsElapsed = ((hour() * 3600) + (minute() * 60) + second)

Serial.print(secondsElapsed);

if hour is between 0-8 it works, but if it's above that, secondsElapsed returns near the maximum value of an unsigned long, that is a 429496xxxx ish number..

I have almost tried anything, calculating just with numbers instead of using time, (hour * (60^2)), ((hour * 1800)*2), and I've tried with normal long, unsigned int, and so on.. But nothing seems to work, can anyone help me?

Thanks!