Hour alignment redux

I butchered #1009 (it's probably high time I sucked it up and got git-flow), so here it is again.

It's a good thing I added those extra tests, because my implementation was wrong.