Rather, you need the waking timer to behave as though the timer had been running while asleep.
This is the right trick.
(Also correct that datetime.now is not a database property.)
Look at the
http://seltani.shoutwiki.com/wiki/Fuel_Runs_Down code sample to see how I handled Goldspring. There's a timer that runs every ten minutes while the instance is awake. It also runs at on_wake time, and immediately computes the correct current value, so that the newly-arrived player sees the right state.
(Since the fuel generator in Goldspring drops one notch every 30 minutes, a check every ten minutes is plenty sufficient.)
I realize this sleep/wake architecture is a nuisance, but it ensures that the server load stays low.
I'll try to write up a simpler code sample for a day-night cycle. The Fuel_Runs_Down is slightly more complicated than that, because the start point of its "day" is the moment somebody presses the "fill" button.