I can't tell you what the law says since laws vary by area and you didn't tell us your general locale. Most places do state that you need to be paid for the time your worked.