I am working on a locale news application.
Readers will get the news close to their place if you are in Paris, your local time zone is Europe/Paris
, and we release news at 9am every morning.
We want to allow before 9am
publishing
How can I check if 9am Europe/Paris
is after or equal to new Date()
(no matter what the client zone is) in JavaScript
?
- In this end I will add an offset of -1hours, to block news posting at 8am
- we already have that check server side, it's mainly for alerting the user that it will posted the next day