BigBadDave
Programmer
...here is the actiob script for my time :
Is this right for setting timezoneoffset ?? Regards
Big Dave
davidbyng@hotmail.com
** If I am wrong I am sorry, but i'm only trying to help!! **
Code:
function datetime (foo) {
var dateToday = new Date();
var TimezoneOffset = dateToday.getTimezoneOffset();
var fiddle = -1;
dateToday.setTime(dateToday.getTime()+TimezoneOffset*fiddle*60*1000+foo*60*60*1000);
var amOrPm;
hoursFinal = dateToday.getHours();
if (hoursFinal<12) {
amOrPm = "am";
} else {
hoursFinal = hoursFinal-12;
amOrPm = "pm";
}
if (hoursFinal == 0) {
hoursFinal = 12;
}
minutesFinal = dateToday.getMinutes();
minutesFinal = minutesFinal.toString();
if (minutesFinal.length == 1) {
minutesFinal = '0'+minutesFinal;
}
secondsFinal = dateToday.getSeconds();
secondsFinal = secondsFinal.toString();
if (secondsFinal.length == 1) {
secondsFinal = '0'+secondsFinal;
}
current_time = hoursFinal+':'+minutesFinal+'.'+secondsFinal+amOrPm+' ';
var dayFinal = dateToday.getDay();
var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
dayFinal = dayNames[dayFinal];
var dayNumber = dateToday.getDate();
var monthFinal = dateToday.getMonth();
var monthNames = ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
monthFinal = monthNames[monthFinal];
var yearFinal = dateToday.getFullYear();
return current_time+dayFinal+' '+dayNumber+' '+monthFinal+', '+yearFinal;
}
this.timeZone0.timeZone = datetime(-12);
this.timeZone1.timeZone = datetime(-8);
this.timeZone2.timeZone = datetime(-4);
this.timeZone3.timeZone = datetime(0);
this.timeZone4.timeZone = datetime(4);
this.timeZone5.timeZone = datetime(8);
this.timeZone6.timeZone = datetime(12);
Is this right for setting timezoneoffset ?? Regards
Big Dave
davidbyng@hotmail.com
** If I am wrong I am sorry, but i'm only trying to help!! **