Created
November 21, 2019 19:53
-
-
Save phoebejaffe/68176ad03108fe603ae8cdb9a6dee22a to your computer and use it in GitHub Desktop.
gets a GMT date object, regardless of your timezone.
This file contains hidden or 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
| const thisMoment = new Date(); | |
| const gmtDate = new Date(thisMoment.getTime() + thisMoment.getTimezoneOffset() * 1000 * 60); | |
| console.log(gmtDate); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment