Better hour calculation