Fixed gethourFrom method