📌  相关文章
📜  javascript 将日期设置为时区 - Javascript 代码示例

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

代码示例1
var d = new Date("2020-04-13T00:00:00.000+08:00"); /* midnight in China on April 13th */
d.toLocaleString('en-US', { timeZone: 'America/New_York' });
//=> "4/12/2020, 12:00:00 PM"
// (midnight in China on April 13th is noon in New York on April 12th)