﻿// TheGamingLib
if(typeof TheGamingLib=="undefined"){
var TheGamingLib={};
};
// DateAndTime
TheGamingLib.DateAndTime={
UpdateEZWinningsClock:function(){
var currentTime = new Date(mTimeStamp);
mTimeStamp += 1000;
var currentHours = currentTime.getHours();
var currentMinutes = currentTime.getMinutes();
var currentSeconds = currentTime.getSeconds();
var currentString = "";
// Pad the minutes and seconds with leading zeros, if required
currentHours = (currentHours < 10 ? "0" : "") + currentHours;
currentMinutes = (currentMinutes < 10 ? "0" : "") + currentMinutes;
currentSeconds = (currentSeconds < 10 ? "0" : "") + currentSeconds;
if(currentHours < 12){
currentString = " AM";
}else{
currentString = " PM";
}
if(currentHours > 12){
currentHours -= 12;
}
// Compose the string for display
var currentTimeString = (currentHours + ":" + currentMinutes + ":" + currentSeconds + currentString + mTimeZName);
// Update the time display
document.getElementById("header_clock").innerHTML = currentTimeString;
}
}
