Revert "🐛 Fixed date helper timezone bug (#9382)"

This reverts commit c3b0219d70.
This commit is contained in:
Aileen Nowak 2018-01-09 18:35:08 +07:00 committed by Katharina Irrgang
parent c3b0219d70
commit b99d3bc70a

View File

@ -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