Skip to content

Commit

Permalink
Merge pull request #19454 from apache/fix/workflow/update-notice-year
Browse files Browse the repository at this point in the history
chore(workflow): fix timezone error when getting new year by `new Date`
  • Loading branch information
plainheart authored Jan 1, 2024
2 parents 247889a + 60cbc9f commit f1d9eb5
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 f1d9eb5

Please sign in to comment.