2

Hoe can I get the format as UTC +0?

const txDate = fromUnixTime(1573094560) 
console.log(txDate)
console.log(format(txDate, 'yyyy-MM-dd hh:mm:ss z'))

Output:

2019-11-07T02:42:40.000Z
2019-11-07 10:42:40 GMT+8
Alvin
  • 7,787
  • 23
  • 77
  • 164

0 Answers0