I want to get date of the last day of week with a specific timezone.
I got this code that works good but it shows the computer timezone. i want to add a specific timezone like GMT-0500
{
var lastday = date.getDate() - (date.getDay() - 1) + 6;
return new Date(date.setDate(lastday));
}
dt = new Date();
dt.setHours(23,59,59,999);
document.getElementById("lastday").innerHTML = endOfWeek(dt).toString();
console.log(endOfWeek(dt).toString());
How can i change the timezone? please help.