ID:141616
 
Code:
#define HOUR    36000
proc
DAYNIGHT()
while(world)
sleep(HOUR*3)
var/obj/Night/O = new /obj/Night
world<<"<b><font color=red>Night falls over the land.</b></font>"
for(var/turf/T in world)
if(!T.weatherProof) T.overlays += O
else
if(istype(T,/turf/LAMP))
T.overlays -= O
T.icon='turfs.dmi'
T.icon_state="lit"
sleep(HOUR*3)
for(var/turf/T in world)
if(!T.weatherProof) T.overlays -= O
if(istype(T,/turf/LAMP))
T.overlays -= O
T.icon='turfs.dmi'
T.icon_state="lamp1"
world<<"<b><font color=yellow>The morning sun rises.</b></font>"



Problem description:
It does not become night time.



            var/obj/Night/O = new /obj/Night

What is the point of that line? It's so random.
In response to Mizukouken Ketsu
It is the night overlays, so it looks dark
In response to Louisthe10
for(var/turf/T)
if(!T.weatherProof) new/obj/nightTimeOverlay(T)

That'll accomplish the same effect, with less coding.