舉一反三,如果要以美國的表示法表示紐約時區,就可以: new Date().toLocaleString('en-US', {timeZone: 'America/New_York'});. 輸出就會是:
確定! 回上一頁