哪位能否告诉这个北京时间到底怎么该过来呀?谢谢了!
//显示各时区时间和日期节日提示
function ShowTime(){
var now = new Date();
var GMThours = now.getUTCHours();
var minutes = now.getMinutes();
var TZOFFSET = now.getTimezoneOffset()/-60;
var TheDate = new MyDate(now);
var now2 = new Date(TheDate.Time+86400000);
var TMW = new MyDate(now2);
if (minutes <= 9) {
minutes = "0" + minutes;
}
for (i in CitySet){
if (CitySet[4] == 1){
city_id = "city_" + i;
hours = GMThours + CitySet[2];
if (hours < 0)
hours += 24;
else if (hours >= 24)
hours -= 24;
if (time_style == 1){
if(hours >= 12){
hours = hours -12;
if (hours == 0)
hours = 12;
TimeStr = hours + ":" + minutes + " PM";
}
else
TimeStr = hours + ":" + minutes + " AM";
}
else
TimeStr = hours + ":" + minutes;
if (TZOFFSET == CitySet[2]){
dot = " ";
|