Convert the date-time into seconds since 1970. You then have a list of numbers, e.g.
List A:
Code:
10 19 20 30 31 32 40
Add 1 to the list:
List B:
Code:
11 20 21 31 32 33 41
For each 'b' in List B,
If 'b' is found in List A,
Then remove 'b' and 'b'-1 in List A.
The remainders in List A is the timestamps you need.