mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 11:55:01 +03:00
Fixed variable date formatting in new email flow
refs https://github.com/TryGhost/Ghost/actions/runs/3892250013/jobs/6643448457 Depending on the environment the date formatting in a newsletter could change. Now it is always set to the DD MMM YYYY format (like the old flow).
This commit is contained in:
parent
6a664d11b9
commit
9650521376
@ -514,7 +514,7 @@ class EmailRenderer {
|
||||
const {href: postFeatureImage, width: postFeatureImageWidth} = await this.limitImageWidth(post.get('feature_image'));
|
||||
|
||||
const timezone = this.#settingsCache.get('timezone');
|
||||
const publishedAt = (post.get('published_at') ? DateTime.fromJSDate(post.get('published_at')) : DateTime.local()).setZone(timezone).toLocaleString({
|
||||
const publishedAt = (post.get('published_at') ? DateTime.fromJSDate(post.get('published_at')) : DateTime.local()).setZone(timezone).setLocale('en-gb').toLocaleString({
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric'
|
||||
|
Loading…
Reference in New Issue
Block a user