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,8 +13,6 @@ module.exports = function (date, options) {
if (!options && date.hasOwnProperty('hash')) {
options = date;
date = undefined;
}
timezone = options.data.blog.timezone;
// set to published_at by default, if it's available
@ -22,6 +20,7 @@ module.exports = function (date, options) {
if (this.published_at) {
date = moment(this.published_at).tz(timezone).format();
}
}
// ensure that context is undefined, not null, as that can cause errors
date = date === null ? undefined : date;