Added functionality for getDetails for a gate open after midnight.