JavaScript will find out the date.
function getTime() { var currentTime = new Date(); var hours = currentTime.getHours(); var minutes = currentTime.getMinutes(); var seconds = currentTime.getSeconds(); var suffix = "AM"; if (minutes < 10) minutes = "0" + minutes; if (hours >= 12) { suffix = "PM"; hours = hours - 12; } if (hours == 0) { hours = 12; } document.write("
" + hours + ":" + minutes + ":" + seconds + " " + suffix + "
"); }