我從google API找到rawoffset(https://maps.googleapis.com/maps/api/timezone/json?location)。現在我想查找UTC時區而不是UTC時間。使用偏移量查找UTC時區
例如:我有紐約市rawoffset和Wana導致UTC-5:00。
這是可能的php或javacript?
我從google API找到rawoffset(https://maps.googleapis.com/maps/api/timezone/json?location)。現在我想查找UTC時區而不是UTC時間。使用偏移量查找UTC時區
例如:我有紐約市rawoffset和Wana導致UTC-5:00。
這是可能的php或javacript?
您可以使用時區時區。然後你可以這樣用它來獲得時區
moment.tz([2012,0],'America/Denver').format('z z');
它將結果 - > -07:00 MST
有時你不得不對包括時刻-timezone.js並使用moment.tz(「America/New_York」).format('Z z');. –
[momentjs時區(https://momentjs.com/timezone/)聽起來很相似,你想 –
由於右聯動 –