How do you set the time system

I created a time system in my game that allows you to add many different features, such as dynamic change of lightning, time-based events and more. The event works quite simply, it's a parallel common event where 225 frames equal one game minute, and the game day is 1 hour and 30 minutes.
But here's the problem I have. If, for example, nps workday starts at 8 o'clock and ends at 16 o'clock then in order to set up his event I need 2 restrictions: missing before 8 o'clock + missing after 16 o'clock. And because of this, I'm more and more often thinking about changing my system so that 0 hours is dawn, and about 12 hours is sunset. That way when creating events it will be much easier for me to set them up since I'll know exactly when my game has nighttime and when it's daylight time.

But before I change my whole system, I just wanted to ask you how you organize your time systems and what problems I might have with this approach. The first thing that comes to mind is the time display on the clock. I would have to convert the true value of game time to what the player is used to (0 hours on game time - 6 hours on real-time). But it's a matter of one event, and it won't be very hard to do. However, what other problems could there be?
the description sounds as if you setup your time in a very strange way, because it should not matter what hour is dawn at all.
you would have to show us what you have done for really detailed advice.

that said - the only reason I can think of to even create your problem would be if you had a single event that both contains the waits/timecounts AND the effects of what would happen when.
That would be a bad design choice - it is usually much better to have one common event do the counting with variables and as low a wait number as possible (because common events reset on map change, they forget how much wait they had at that moment), and a different common event checking on the hour and creating the effects based on that number.
the description sounds as if you setup your time in a very strange way, because it should not matter what hour is dawn at all.
you would have to show us what you have done for really detailed advice.

that said - the only reason I can think of to even create your problem would be if you had a single event that both contains the waits/timecounts AND the effects of what would happen when.
That would be a bad design choice - it is usually much better to have one common event do the counting with variables and as low a wait number as possible (because common events reset on map change, they forget how much wait they had at that moment), and a different common event checking on the hour and creating the effects based on that number.
I'm sorry I can't show you how the time event works because the editor is not in English, but it's quite simple. Every 225 frames the game adds +1 to the variable "minutes". If "minutes" >= 60, then +1 to the variable "hours" and the minutes are reset. If the variable "hour" >=24, they are reset. The game world variables and switches changes every hour. Every time an hour passes in the game, another common event is activated, which changes the ambient light based on the hour , and also triggers other game mechanics that I need ( for example, every hour the player's health percentage is restored). My problem is that when setting up npcs events I can not decide on a system by which they appear in a certain place and disappear. For example, right now my worker events have 3 pages:
1) If the " hours" is less than 6 - there is no event
2) Main event page, no triggers
3) If " hours is greater than 18 - no event

And I was thinking of changing my system so that dawn would be at 0 o'clock in game time, and then instead of 3 pages I would only make 2. But now I realize that this is a bad system too, because there could be nps that do certain actions not from 6 o'clock, but for example from 8, and then it would be exactly the same.

So I'm thinking based on which parameter I should organize the event triggers. So far they are based on the variable "hours". But I'm thinking, what if I divide my day into different intervals. I mean, activate different switches based on the time and trigger events based on those switches.

For example, from 10 a.m. to 2 p.m., the "noon" switch would be activated and different events would be triggered based on that switch. As soon as it is over 2 pm, the next switch "afternoon" will be activated, during which time the NPC events will be doing other things and will change their location. So these events will only be able to contain one page, which will be triggered by a single switch.

But again, I don't know if this would be more efficient than just showing events based on the "hours" variable. And wanted to know how other people create time of day dependent events.
best way to set a time system for NPC's

if var1 (hours) >= 8
if var 1 (hours) <= 16
do stuff
end
else
if var1 (hours) >= 16
if var1 (housrs <= 8
do the other stuff
end
end
end

it depends, if you have conditionalBranch+ (for MV), you can shorten
it extremely, otherwise, you can also use a scriptcall to make it shorter
and not nested, $gameVariable.value(1, x) && $gameVariables.value (2, y)
as scriptcall.

if you use MZ, than it might work a bit different, but the purpose stays
the same, depending what exactly the npc's does etc.

also Ocram_NPC_Schedulerr for this kind of problem, where it goes,
what time, when, where, what etc.

if you use MV, you need to use RETRO in order to make it work, if you use
MZ, you can use it than, both require the core in order to work.

I don find the link on the forum, just his website, but you get the point.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-set-the-time-system.143276/