What would happen if you are chaining a swarm Pokémon during the 23:59 and when the clock gets to 0:00, what will happen to your chain?
However, if you have a chain going, your swarm will not change at the end of the day (23:59)!
Directly ripped it from here. Since the swarm doesn't end, it's possible to continue your chain even after midnight.
Hope I helped!
If a swarm ends while a chain is in progress, or a Pokémon otherwise ceases to become available, then that Pokémon will continue to be available until the chain is broken.
Bulbapedia
So, even if the swarm ends, that Pokemon's chain will still keep going, until it breaks, which will stop you from encountering that Pokemon again.
I hope I helped!