Added time-left query in record_now

This is to check how much time is left before the time-block
is finished.
Implemented timestamp boundaries for weeks