Converting a date string into UTC+0530 format using javascript

前端 未结 2 858
陌清茗
陌清茗 2020-12-07 03:47

I have a date in the format 14-Feb-2011, but I want to convert it into the format Mon Feb 14 10:13:50 UTC+0530 2011. How Can I achieve this?

2条回答
  •  星月不相逢
    2020-12-07 04:22

    var d = new Date("14-Feb-2011");
    

    this will give an output of Mon Feb 14 2011 00:00:00 GMT-0500 (Eastern Standard Time)

提交回复
热议问题