Unix time rounded to today's midnight

Hopefully this change fixes #155.
@usmonster does it look good to you?