i have this code to show and hide a certain element at a given time:
function live(){
var now = new Date();
var elm = document.getElementById("live");
if(now.getDay() == 0 && (now.getHours() >= 11 && now.getHours() <= 13)) {
elm.style.display = 'block';
} else{
elm.style.display = 'none';
}
}
However, this wont work as expected because i need the time to be in Japan time, not the users time. How can i set the default timezone?
Thank you.