PDA

View Full Version : Time Clock based on GMT



HilaryJ
02-09-2010, 01:03 AM
Hi! (: I have the following code that displays the time based on the end-users computer time clock. How would I change it so that the end-user sees the greeting based on GMT time zone???


<SCRIPT LANGUAGE="Javascript">
<!--
{
helixtime = new Date()
hrstime = helixtime.getHours()
if (hrstime < 7){timemsg = "You're up <B>really</B> early! "}
if (hrstime > 6 && hrstime <12){timemsg = "Good morning! "}
if (hrstime > 11 && hrstime <18){timemsg = "Good afternoon! "}
if (hrstime >17){timemsg = "Good evening! "}
document.write(timemsg)}
// -->
</SCRIPT>