V
vunet.us
How can I convert UTC time such as 1173451235415 to a local time I can
read? Thank you
read? Thank you
How can I convert UTC time such as 1173451235415 to a local time I can
read? Thank you
gmtDate=new Date(UTC Date)
e.g.-
alert(Date(1173451235415))
thank you, my problem was that 1173451235415 could not be a string.
when i parseInt(sometime), it works well. thank you very much.
even a string should work-
Date("1173451235415")
or +sometime
e.g
Date(+somtime)
even a string should work-
Date("1173451235415")
or +sometime
e.g
Date(+somtime)
Don't post untested code; it shows that you overestimate your ability.
In IE6 at least, Date(X) ignores the value of X. See ISO 16262
sections 15.9.2 & 15.9.2.1 which seem not to agree; ECMA-262 likewise.
Calling new Date(1173451235415) does no conversion; the digits are
converted to an IEEE Double (type Number) outside the call, and that
value is copied into the newly-created Date Object.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.