我想獲得當前的標準IST時間,但我只使用下面的函數獲取系統時間。獲取標準IST時間
var currentTime = new Date();
var currentOffset = currentTime.getTimezoneOffset();
var ISTOffset = 330;
var d1 = new Date(currentTime.getTime() + (ISTOffset + currentOffset)*60000);
是否有幫助我獲得標準IST時間的API或庫?
的可能的複製[可以在javascript IST時間(https://stackoverflow.com/questions/22134726/get-ist-time-in-javascript) – Nagaraju
是的,爲什麼不使用moment.js:http://momentjs.com/ – binariedMe
什麼是您的系統時區設置爲 – Nagaraju