Daytime script working with the servers time

Well I found a daytime script on gmod.org and I’m not sure how it works exactly

// table.
local daylight = { };


// variables.
local DAY_LENGTH    = 120 * 24; // 24 hours
local DAY_START        = 5 * 120; // 5:00am
local DAY_END        = 18.5 * 120; // 6:30pm
local DAWN            = ( DAY_LENGTH / 4 );
local DAWN_START    = DAWN - 244;
local DAWN_END        = DAWN + 244;
local NOON            = DAY_LENGTH / 2;
local DUSK            = DAWN * 3;
local DUSK_START    = DUSK - 244;
local DUSK_END        = DUSK + 244;
local LIGHT_LOW        = string.byte( 'b' );
local LIGHT_HIGH    = string.byte( 'z' );

I saw this and I’m not sure if it works by seconds or minutes, if it works by minutes, can someone make the time realistic, or just completely make the script work with the servers time? Thanks in advance

That script is quite clearly wrong.

DAY_LENGTH = 3600 * 24

If it’s using seconds. Otherwise 60*24.

And then it should be realistic? Or more realistic.

not sure, haven’t read the rest of it. Obviously, whoever wrote it has no idea about basic maths.

Hah, well I’ll try it, thanks!

I wrote it, the math isn’t wrong it just isn’t realistic time.

Ah. Explains that.