Skip to content

Commit

Permalink
feat(layout): change date time format to locale string instead of UTC…
Browse files Browse the repository at this point in the history
… TZ time
  • Loading branch information
imaegoo committed Dec 24, 2020
1 parent a679099 commit 6807b73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layout/common/article.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ module.exports = class extends Component {
<div class="level-left">
{/* Creation Date */}
{page.date && <span class="level-item" dangerouslySetInnerHTML={{
__html: _p('article.created_at', `<time dateTime="${date_xml(page.date)}" title="${date_xml(page.date)}">${date(page.date)}</time>`)
__html: _p('article.created_at', `<time dateTime="${date_xml(page.date)}" title="${new Date(page.date).toLocaleString()}">${date(page.date)}</time>`)
}}></span>}
{/* Last Update Date */}
{page.updated && <span class="level-item" dangerouslySetInnerHTML={{
__html: _p('article.updated_at', `<time dateTime="${date_xml(page.updated)}" title="${date_xml(page.updated)}">${date(page.updated)}</time>`)
__html: _p('article.updated_at', `<time dateTime="${date_xml(page.updated)}" title="${new Date(page.updated).toLocaleString()}">${date(page.updated)}</time>`)
}}></span>}
{/* author */}
{page.author ? <span class="level-item"> {page.author} </span> : null}
Expand Down

0 comments on commit 6807b73

Please sign in to comment.