I use moment.utc to format time from UTC string, according to https://hexo.io/zh-cn/docs/helpers.html#moment, so I search momentjs and moment-timezone, so used utc() function to parse it, but failed with following error:
xxxx/hexo-blog/themes/hexo-theme-snippet/layout/_partial/comments.ejs:30
28| } %>
29| <span class="gt-comment-date">
>> 30| <%= moment.utc(comment.comment_date_gmt).format('YYYY-MM-DD hh:mm') %>
31| </span>
32| </div>
33| <div class="gt-comment-body markdown-body">
moment.utc is not a function
I use moment.utc to format time from UTC string, according to https://hexo.io/zh-cn/docs/helpers.html#moment, so I search
momentjs
andmoment-timezone
, so usedutc()
function to parse it, but failed with following error:Environment & Settings
Node.js & npm version
Hexo and Plugin version(
npm ls --depth 0
)