Clock in different time zones

前端 未结 6 1438
南方客
南方客 2021-01-12 18:08

I am trying to create two clocks on a website that says two times on it. One from London and the other from New York.

I have been able to create a clock that reads t

6条回答
  •  逝去的感伤
    2021-01-12 18:40

    currentTime.getTimezoneOffset() will give you the time difference between Greenwich Mean Time (GMT) and local time, in minutes.

    You can use the value to calculate time in required timezone.

提交回复
热议问题