Use local time instead of NOW(), fixes #5160