📜  date().toisostring().slice(0 10) 给出错误结果 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:58.708000             🧑  作者: Mango

代码示例1
//Add Z in the end for getting the correct value with local timezone
var a = new Date("June 08, 2018 Z");
var res = a.toISOString().slice(0, 10);
console.log(res);