the audit period ending should also take into account the value at exact midnight.
This makes the script account for periodic exists events that are stored exactly at midnight.