You have to multiply by 1000 as JavaScript counts in milliseconds since epoch (which is 01/01/1970), not seconds :
var d = new Date(timestamp*1000);
More Related Contents:
- how to parse json value to javascript [closed]
- setTimeout in a for loop with array as an argument misbehaving
- Is it possible to simulate key press events programmatically?
- HTML5 Local storage vs. Session storage
- Can’t access object property, even though it shows up in a console log
- Does JavaScript have “Short-circuit” evaluation?
- Run Greasemonkey script on the same page, multiple times?
- Setting background-image using jQuery CSS property
- Pass parameter to p:remoteCommand from JavaScript
- Why is the value of my input always empty if I store it in a variable?
- How to use componentWillMount() in React Hooks?
- How to call a REST web service API from JavaScript?
- Javascript trick for ‘paste as plain text` in execCommand
- What is the difference between React Native and React?
- ReactJS SyntheticEvent stopPropagation() only works with React events?
- javascript to check when the browser window is closed
- create object using variables for property name [duplicate]
- How to find out the actual event.target of touchmove javascript event?
- How to handle calling functions on data that may be undefined?
- event.offsetX in Firefox
- How can I preserve the search filters in jqGrid on page reload?
- How to return from a Promise’s catch/then block?
- DOM / pure JavaScript solution to jQuery.closest() implementation?
- How do I determine if a checkbox is checked?
- How to get the canvas-relative position of an object that is in a group?
- How to make the HTML renders before the alert is triggered?
- How can I Interleave / merge async iterables?
- Dynamically generated table – using an array to fill in TD values
- Why does the `map` method apparently not work on arrays created via `new Array(count)`?
- Add a JavaScript button using Greasemonkey or Tampermonkey?