var nowhours = new Date();
if((nowhours >= 0) && (nowhours <4)){gametime = 120;}
else if((nowhours >= 4) && (nowhours <8)){gametime = 240;}
else if((nowhours >= 8) && (nowhours <12)){gametime = 120;}
else if((nowhours >= 12) && (nowhours <18)){gametime = 120;}
else if((nowhours >= 18) && (nowhours <20)){gametime = 90;}
else if(nowhours >= 20){gametime = 120;}
var nowhours = new Date().getHours();
Find more questions by tags JavaScript
that is, if it's a network game, in one moment of time on a game server, people in different time zones will be at different times of the game. - antonetta.Collins commented on July 9th 19 at 10:14