Skip to content

Commit

Permalink
Revert "🐛 Fixed date helper timezone bug (TryGhost#9382)"
Browse files Browse the repository at this point in the history
This reverts commit c3b0219.
  • Loading branch information
aileen authored and kirrg001 committed Jan 9, 2018
1 parent c3b0219 commit b99d3bc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/server/helpers/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ module.exports = function (date, options) {
if (!options && date.hasOwnProperty('hash')) {
options = date;
date = undefined;
}

timezone = options.data.blog.timezone;
timezone = options.data.blog.timezone;

// set to published_at by default, if it's available
// otherwise, this will print the current date
if (this.published_at) {
date = moment(this.published_at).tz(timezone).format();
// set to published_at by default, if it's available
// otherwise, this will print the current date
if (this.published_at) {
date = moment(this.published_at).tz(timezone).format();
}
}

// ensure that context is undefined, not null, as that can cause errors
Expand Down

0 comments on commit b99d3bc

Please sign in to comment.