If a player wants to skip the night while other players are online aswell, then that player has to stay in bed for more than 10 seconds in order to activate the 1 player sleep mechanism. After those 10 seconds have passed, a Command Block will execute the command "/time add 1000" till it's daytime. The reason for not using "/time set 0" is that that will also reset the local difficulty. Also, if you are a player that doesn't want the night to be skipped you have the option to kick the sleeping player out of their bed by clicking "Cancel" next to the sleep message.