How to ignore user's time zone and force Date() use specific time zone
- by warpech
In an JS app, I receive timestamp (eq. 1270544790922) from server (Ajax).
Basing on that timestamp I create Date object using:
var _date = new Date();
_date.setTime(1270544790922);
Now, _date decoded timestamp in current client locale time zone.
I would like _date to return time in Europe/Helsinki time zone. How can I do that?