is there an easy way to get the unix timestamp in javascript from a specific timezone? for example i want the client send me an unix timestamp but i want to get it to match my timezone.
thanks!
Why not simply send the date in UTC, and then convert to your timezone on the server?
var utcEpochSeconds = dateObj.getTime() + (dateObj.getTimezoneOffset() * 60000);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With