2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

🐛 Fixed date helper timezone bug

closes #9381

Fixes a bug where the date helper would ignore any timezone settings, when called with a specific date option, e. g. `published_at`, as `timezone` was only ever assigned when called without options.
This commit is contained in:
Aileen Nowak 2018-01-09 18:41:40 +07:00 committed by Katharina Irrgang
parent b99d3bc70a
commit 430973b85b

View file

@ -27,6 +27,7 @@ module.exports = function (date, options) {
format = options.hash.format || 'MMM DD, YYYY';
timeago = options.hash.timeago;
timezone = options.data.blog.timezone;
timeNow = moment().tz(timezone);
if (timeago) {