Created
April 21, 2021 08:46
-
-
Save mjwhansen/7a559e114fcce710dcc740cec02c5b8a to your computer and use it in GitHub Desktop.
Scheduling link redirect based on timezone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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='#'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment