Resolve crash in normalize_datetime

Normalize_datetime would crash when a datetime had more than 999,000 microseconds and the seconds was already at 59.  This fixes that.