How to ignore user's time zone and force Date() use specific time zone
Posted
by warpech
on Stack Overflow
See other posts from Stack Overflow
or by warpech
Published on 2010-05-05T08:35:54Z
Indexed on
2010/05/05
8:38 UTC
Read the original article
Hit count: 336
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?
© Stack Overflow or respective owner