View Single Post
Join Date: Aug 2006
Posts: 4
Reputation: Gravis is an unknown quantity at this point 
Solved Threads: 0
Gravis Gravis is offline Offline
Newbie Poster

Re: DateTime - TimeZone conversion with Javascript. Partially working!

 
0
  #2
Aug 28th, 2006
Ok, I resolved this myself. I had to change the code down below to this...
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. var hour = time.getHours() ;
  2. var minute = time.getMinutes();
  3. var curTime = date+" "+GetMonth(time.getMonth())+" ";
  4. if(hour==0) { hour = "12";}
  5. curTime += ((hour > 12) ? hour - 12 : hour);
  6. curTime += ((minute < 10) ? ":0" : ":") + minute;
  7. curTime += (hour >= 12) ? " PM" : " AM";
Reply With Quote