mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Revert "🐛 Fixed date helper timezone bug (#9382)"
This reverts commit c3b0219d70
.
This commit is contained in:
parent
c3b0219d70
commit
b99d3bc70a
1 changed files with 6 additions and 7 deletions
|
@ -13,8 +13,6 @@ module.exports = function (date, options) {
|
||||||
if (!options && date.hasOwnProperty('hash')) {
|
if (!options && date.hasOwnProperty('hash')) {
|
||||||
options = date;
|
options = date;
|
||||||
date = undefined;
|
date = undefined;
|
||||||
}
|
|
||||||
|
|
||||||
timezone = options.data.blog.timezone;
|
timezone = options.data.blog.timezone;
|
||||||
|
|
||||||
// set to published_at by default, if it's available
|
// set to published_at by default, if it's available
|
||||||
|
@ -22,6 +20,7 @@ module.exports = function (date, options) {
|
||||||
if (this.published_at) {
|
if (this.published_at) {
|
||||||
date = moment(this.published_at).tz(timezone).format();
|
date = moment(this.published_at).tz(timezone).format();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ensure that context is undefined, not null, as that can cause errors
|
// ensure that context is undefined, not null, as that can cause errors
|
||||||
date = date === null ? undefined : date;
|
date = date === null ? undefined : date;
|
||||||
|
|
Loading…
Reference in a new issue