Fix issues
Use a shared method to get time parts