Fish Wang says to YSITD var timeZone = 8; var weekDay = Math.floor((Date.now() + 86400 * 1000 * 4 + 3600 * 1000 * timeZone) / 86400 / 1000 % 7);