The built-in clock can erase steps. All counts are reset at midnight. If the clock is set incorrectly this reset function could trigger at the wrong time.
However, intentionally reversing the AM/PM setting on your clock, will trigger it at noon instead. Allowing you to have a full night of step counts without interruption.
See how to set the clock.