convert timestamp to unix time in js code example
Example 1: convert date to unix timestamp javascript
new Date('2012.08.10').getTime() / 1000 //secs
new Date('2012.08.10').getTime() //milliseconds
Example 2: timestamp to unix time react
var unixTimestamp = moment('2012.08.10', 'YYYY.MM.DD').unix();