database - How do I convert an Oracle Date object/Long into a javascript date? -


i'm querying web service returns date oracle database looks this: /date(1369519200000)/ haven't slightest clue value of long represents, don't know how convert javascript date object.

please help

it looks epoch data in milliseconds:

var ms = 1369519200000; var d = new date(0); d.setmilliseconds(ms); 

d 'sat may 25 2013 22:00:00 gmt' (via d.toutcstring()), sounds might expect.

this doesn't take timezones account; if know date utc can use setutcmilliseconds instead, or just:

var d = new date(ms); 

but need know web service sending know you're interpreting date correctly - whether need apply timezone or daylight saving adjustments, example.

no idea it's general reliability, this article includes info on data handling, including epoch date means.


Comments

Popular posts from this blog

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -

python - How to create a legend for 3D bar in matplotlib? -