Small tweaks, comments

This commit is contained in:
Will Boyd
2024-02-27 08:27:52 -05:00
parent dce423ac16
commit 2135f260c9
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -3,8 +3,9 @@ const luxon = require('luxon');
const settings = require('../settings');
// get post date, optionally formatted as specified in settings
// this value is also used for year/month folders, date prefixes, etc. as needed
module.exports = (post) => {
const dateTime = luxon.DateTime.fromRFC2822(post.pubDate[0], { zone: settings.custom_date_timezone || 'utc' });
const dateTime = luxon.DateTime.fromRFC2822(post.pubDate[0], { zone: settings.custom_date_timezone });
if (settings.custom_date_formatting) {
return dateTime.toFormat(settings.custom_date_formatting);