Or, get a battery powered clock and a normally closed relay. When power is on, the relay is held in the open position, when power is lost the relay reverts to the normally closed position and the clock runs for as long as the battery holds out, or until power comes back. Don't know how you'd tell when more than 12 or 24 hours had gone by, guess that would depend on the clock used.
In the good (or was it bad) old days of mains powered clocks they were ideal for logging outages (of minutes or hours durations). All you had to do was ensure the clock was set to the correct time then view it several hours/days later. If there had been an outage, the clock was slow by the total length of outage duration. OK it wasn't rocket science but it worked.
I am testing one of Jack's RTC boards. As he indicates, these are really neat RTC chips, with many features. The power up and power down logging is especially interesting for my data logging arduino's. My board has been running for ~10 days (Jack can correct me on the last time set as he did it before delivery) and I just checked the time against the NPT source. The error is 7 seconds slow (I have not trimmed it yet - I want to see the out of the box accuracy).What you are looking for is included in the library Jack wrote, as an example sketch.Duck
Lots of cool ideas here. If you get one working please post as I might want to build one myself. You might consider having the resolution to measure short term power outages (sub 1 second). Around here our service provider doesn't consider anything less than 30 seconds a power outage. That is fine, but I happen to believe that any service disruption is a problem. If it makes my computer die and my stereo loose it's presets its a problem. At the business I worked at this summer we had a flywheel that provided instant transitional power for our test equipment to cover short outages until the generator fired up. The flywheel has a counter that displays the number of times it has been activated. Everyone is always surprised to see how often it runs.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16