Date.getSeconds() 會依本地時間回傳日期物件中的秒數,範圍為 0 到 59。
new Date().getSeconds()
它適合用於時鐘顯示、倒數計時與時間格式化。
若需要 UTC 秒數,可使用 getUTCSeconds()。