Skip to content

Commit

Permalink
chore(workflow): fix timezone error when getting new year by new Date
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Dec 31, 2023
1 parent 3238144 commit 60cbc9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/.scripts/update-notice-year.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ module.exports = async function updateNoticeYear(
/** @type {{ octokit: Octokit, context: Context }} */
{ octokit, context }
) {
const newYear = new Date().getFullYear()
const now = new Date()
// Change to UTC+8
now.setHours(now.getHours() + 8)
const newYear = now.getFullYear()
console.log('Prepare to update notice year to', newYear)

const noticeContent = `Apache ECharts
Expand Down

0 comments on commit 60cbc9f

Please sign in to comment.