diff --git a/scripts/nodes/footer.mjs b/scripts/nodes/footer.mjs index fc23472..78df1ad 100644 --- a/scripts/nodes/footer.mjs +++ b/scripts/nodes/footer.mjs @@ -3,7 +3,10 @@ import formatter from '@uiw/formatter'; export function footer(options = {}) { let footerText = '© 2022 Kenny Wang.'; if (options.isHome) { - footerText += ` Updated on ${formatter('YYYY/MM/DD HH:mm:ss', new Date())}`; + const now = new Date(); + const utc = now.getTime() + now.getTimezoneOffset() * 60000; + const cst = new Date(utc + 3600000 * 8); + footerText += ` Updated on ${formatter('YYYY/MM/DD HH:mm:ss', cst)}`; } return { type: 'element',