in reply to Midnight wraparound.
How about keeping track of seconds from the Epoch, and using Time::HiRes to convert into human-readable forms?