mktime in js code example Example: mktime in js var seconds = new Date(year, month, day, hours, minutes, seconds, 0).getTime() / 1000;