mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-06-05 15:09:59 +09:00
add timezone to settings.js
This commit is contained in:
Generated
+1897
-1
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -110,7 +110,7 @@ function getPostTitle(post) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getPostDate(post) {
|
function getPostDate(post) {
|
||||||
const dateTime = luxon.DateTime.fromRFC2822(post.pubDate[0], { zone: 'utc' });
|
const dateTime = luxon.DateTime.fromRFC2822(post.pubDate[0], { zone: settings.custom_date_timezone || 'utc' });
|
||||||
|
|
||||||
if (settings.custom_date_formatting) {
|
if (settings.custom_date_formatting) {
|
||||||
return dateTime.toFormat(settings.custom_date_formatting);
|
return dateTime.toFormat(settings.custom_date_formatting);
|
||||||
|
|||||||
@@ -18,3 +18,7 @@ exports.custom_date_formatting = '';
|
|||||||
// categories to be excluded from post frontmatter
|
// categories to be excluded from post frontmatter
|
||||||
// this does not filter out posts themselves, just the categories listed in their frontmatter
|
// this does not filter out posts themselves, just the categories listed in their frontmatter
|
||||||
exports.filter_categories = ['uncategorized'];
|
exports.filter_categories = ['uncategorized'];
|
||||||
|
|
||||||
|
// override date timezone
|
||||||
|
// it change date and slug to localized timezone, e.g. Asia/Tokyo
|
||||||
|
exports.custom_date_timezone = 'Asia/Tokyo';
|
||||||
|
|||||||
Reference in New Issue
Block a user