Skip to content

Instantly share code, notes, and snippets.

View mjwhansen's full-sized avatar

Michele Hansen mjwhansen

View GitHub Profile
@mjwhansen
mjwhansen / timezone.js
Created April 21, 2021 08:46
Scheduling link redirect based on timezone
var gmtOffset = - new Date().getTimezoneOffset() / 60;
if (gmtOffset >= -11 && gmtOffset <= -6) {
window.location.href='#';
} else if (gmtOffset <= -4) {
window.location.href='#';
} else {
window.location.href='#';
}