This happened when the Israelites were still in the desert. They found a man gathering wood on the Sabbath day.