Getting GMT Time for the Day

 var strDate = new Date();

 hour = strDate.getUTCHours().toString();
 minute = strDate.getUTCMinutes().toString();
 second = strDate.getUTCSeconds().toString();

 if (hour.length == 1) { hour = "0" + hour; }
 if (minute.length == 1) { minute = "0" + minute; }
 if (second.length == 1) { second = "0" + second; }

 Cal.SetHour(hour); 
 Cal.SetMinute(minute); 
 Cal.SetSecond(second);

Comments are closed.