Schedule End Time

Just wondering for the end time of a schedule event, for example, if I set at 17:00, will the client stop playing the event on 16:59:59 or 17:00:00 or 17:00:59?

I have two events, one for 12:00-17:00, and another one for 17:00-21:00, not sure if at 17:00 there will be an overlap?

That could depend on layout duration
If it will end on 17:00+ then it will move on to the next layout, if it will end 16:59 then it might be displayed one more time (perhaps not even fully, again depending on the duration) and then move on to the next layout.

Unless you have some really long durations on your layout that could interfere with the schedule it should be fine.

In worst case the next layout could be delayed for nearly whole duration of your first layout.
If you’d like to avoid this situation, you can consider enabling the ‘Expire Modified Layouts?’ option.
It can be found in Display settings page -> edit display profile assigned to your device -> advanced tab