function prettyDate2(time) {
var date = new Date(parseInt(time));
return date.toLocaleTimeString(navigator.language, {
hour: '2-digit',
minute:'2-digit'
});
}
Category: time
how to set time with jwt token in node js
var token = jwt.sign({email_id:'123@gmail.com'}, "Stack", {
expiresIn: "10h" // it will be expired after 10 hours
//expiresIn: "20d" // it will be expired after 20 days
//expiresIn: 120 // it will be expired after 120ms
});
how to set expire time of jwt token in node js
var token = jwt.sign({email_id:'123@gmail.com'}, "Stack", {
expiresIn: '24h' // expires in 24 hours
});