Quantcast
Channel: Conversion from timestamp to time in JavaScript - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Conversion from timestamp to time in JavaScript

$
0
0

My problem is that I am receiving a timestamp from another app.When I convert the timestamp to time the time that gets returned is always wrong

This is the JavaScript code:

var time = new Date(timeStamp);

timeStamp = 1520934000461.My app returns the time: Tue Mar 13 2018 10:40:00and the actual time is one hour earlier.

I tested the timeStamp with online converters and the converting is right and the timeStamp that comes to my app is right.

thank you


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images