13 lines
222 B
JavaScript
13 lines
222 B
JavaScript
|
function timeStamp(dateTimeISO8601) {
|
||
|
const date = new Date(dateTimeISO8601)
|
||
|
|
||
|
date.setHours(date.getUTCHours() - 3)
|
||
|
|
||
|
const timestamp = date.getTime() / 1000
|
||
|
|
||
|
return timestamp
|
||
|
}
|
||
|
|
||
|
|
||
|
module.exports = timeStamp
|