@Julius Kavay Thanks for catching that! I had only tested with UTC time when I posted that. Have updated the code in the previous comment to account for roll over of hours/days.
Regarding your second point, I agree that validation should be done before processing the data. I have moved validation to the beginning of the method. Currently I don't have a use case for having validation be in its own method but if I do later, it would be easy to refactor it out from this method.
- Log in to post comments