as3 を使用して IST にアクセスする必要があります。正確な IST が必要なため、システム時刻は必要ありません。システム時刻を使用します。私たちを手伝ってくれますか?どうもありがとうございました。
1 に答える
0
これはあなたが望むものを助けるかもしれません。
<html>
<head>
<title>time test</title>
<script>
function getTime(zone, success) {
var url = 'http://json-time.appspot.com/time.json?tz=' + zone,
ud = 'json' + (+new Date());
window[ud]= function(o){
success && success(new Date(o.datetime));
};
document.getElementsByTagName('head')[0].appendChild((function(){
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = url + '&callback=' + ud;
return s;
})());
}
getTime('GMT', function(time){
// This is where you do whatever you want with the time:
alert(time);
document.getElementById("time").innerHTML=time;
});
</script>
</head>
<body>
<h1 id="time"></h1>
</body>
</html>
于 2013-12-12T07:12:37.953 に答える