Possibility of not setting back the timeSolved

How can we not turn back the clock?

When a vote is taken, time reverts to the morning of the vote, not the next morning.

 

It would therefore be nice to be able to configure the vote as follows:

1 - voteday

2 - Time set to 23:59

3 - waiting 5 seconds... (until the 00h01 mark has passed)

4 - Time set ton 7h30

 

This would mean that the night would really be over and not I day restarted...

This would mean that the weather could change and not go back to exactly the same day.

 

Thanks in advance for your consideration & Thank's so much for all your AMAZING mods !

As the clock does not state "days" it would be impossible to state that the time is reverting "back" to the morning not "forward" to the next morning, The vote starts at the onset of night (on my servers 7pm) it would be pointless to vote for the day and the clock go forward and then go to 9am , the weather is not dependent on the time of day, you dont get a repeat of the weather everytime you skip night (sometimes x10/x20 a session)

Merged post

I should also mention that the title is "skip" night vote and a skip is forwards not backwards
def : (a step in a progression or series)

No pookings, OP is correct, rust does have a calandar. All the people that wonder why they don't get the normal events; it's because they use plugins like this. It does not work as it should, so they are forced to use another plugin to combat what this has broken. I bet you do, and for some reason as long as you've been around still don't know why.

It is supposed to add 1 day, maybe this does not work in rust?

server.Time = server.Time.Date + TimeSpan.Parse(configData.Options.TimeToSet);
server.Time.Date.AddDays(1);

see: https://umod.org/community/skip-night-vote/21604-prevent-server-events-being-reset?page=1#post-3

I do not use another plugin to combat the effects of this one,
all the events on my servers run with skipping night or no, such as cargo ship, patrol heli, cargo plane, weather events , and as i stated above you dont reset the clock back you skip it forward and as your link shows a patch was introduced to fix the  *problem a year ago

If I make this request, it's because I've checked... The weather restarts and repeats itself over and over again. After looking, I CONFIRM that the weather works via the “TimeToSet” command and therefore sets the time TO THE SAME DAY. Please note that I've already skimmed the source code of this plugin to be able to certify this (I'm not relying on the plugin's simple name here...) thank you gentlemen for your answers.

What I'm waiting for here is to know if it would be possible to add a code, for example:

void SetTemporaryTime()
{
SetTime("23:59:00");
timer.Once(5f, () =>
{
SetTime("07:35:00");
});
}

void SetTime(string time)
{
var parts = time.Split(':');
int hour = int.Parse(parts[0]);
int minute = int.Parse(parts[1]);
int second = int.Parse(parts[2]);
TOD_Sky.Instance.Cycle.Hour = hour + (minute / 60f) + (second / 3600f);
}

This would allow you to set the time (on the same day as the vote) to 11:59 p.m., wait a few seconds for the time to change to 00:01 a.m. and then enable a TimeSet at 7:30 a.m. (the day after the vote).

Thank you.

So that fix that was confirmed to work just 3mo ago doesn't? I'm curious do your events work normally using this it's just the weather(before/after the 'fix')? This seems simpler if you are fine with some coding, 7.5f = 7:30, and you probably don't need to wait a full 5 seconds:

if (success) {
	TOD_Sky.Instance.Cycle.Hour = 23.99f;
	timer.Once(3f, () => TOD_Sky.Instance.Cycle.Hour = 7.5f);
	//server.Time = server.Time.Date + TimeSpan.Parse(configData.Options.TimeToSet);
	//server.Time.Date.AddDays(1);
	server.Broadcast($"{configData.Messaging.MainColor}{GetMSG("Voting was successful, skipping night.")}</color>");
}
​

Hello firingLaserz
I can confirm that this solves my problem!

Thanks to you, my friend, you're wonderful!