最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Equivalent of PHP gmdate - Stack Overflow

programmeradmin2浏览0评论

I'm trying to sign an Amazon request and I need the following timestamp format:

gmdate('Y-m-d\TH:i:s\Z');

How can I obtain that in a nodejs environment? Many thanks in advance.

I'm trying to sign an Amazon request and I need the following timestamp format:

gmdate('Y-m-d\TH:i:s\Z');

How can I obtain that in a nodejs environment? Many thanks in advance.

Share Improve this question asked Dec 14, 2017 at 9:25 JumpaJumpa 4,41912 gold badges60 silver badges105 bronze badges 3
  • MomentJS is one of the most popular JS libraries for date-time manipulation. – 31piy Commented Dec 14, 2017 at 9:26
  • 1 You should provide an example of the format you require, there is little consistency for tokens used in date and time format strings. – RobG Commented Dec 14, 2017 at 12:32
  • Probably a duplicate of Where can I find documentation on formatting a date in JavaScript? – RobG Commented Dec 14, 2017 at 19:51
Add a ment  | 

1 Answer 1

Reset to default 13

For anyone who will need this:

new Date().toISOString()
发布评论

评论列表(0)

  1. 暂无评论