js to get the current time in different time zones of the world

Reason: The earth is divided into 24 time zones, and there is a time difference between each time zone. Therefore, when it comes to displaying time on the front-end page in different time zones, you cannot simply pass in a timestamp, because the timestamps are the same. However, in different time zones, the time displayed by the same timestamp is different, so to show the correct time, we need to obtain the correct local time according to different time zones.

code:

Guess you like

Origin blog.csdn.net/m0_46318298/article/details/129614102