add one hour to current time

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Aug 2005
Posts: 26
Reputation: aish is an unknown quantity at this point 
Solved Threads: 0
aish's Avatar
aish aish is offline Offline
Light Poster

add one hour to current time

 
0
  #1
Sep 19th, 2005
How can I add one hour to current time using javascript?
Reply With Quote Quick reply to this message  
Join Date: Oct 2003
Posts: 85
Reputation: g0rb4ch3v is an unknown quantity at this point 
Solved Threads: 0
g0rb4ch3v g0rb4ch3v is offline Offline
Junior Poster in Training

Re: add one hour to current time

 
0
  #2
Sep 19th, 2005
I am not sure but in the following example why not add a +1 next to hour in the formula and see if that works.


<SCRIPT language="JavaScript">
<!--
var time = new Date()
var hour = time.getHours()
var min = time.getMinutes()
var sec = time.getSeconds()
document.write(hour + ":" + min + ":" + sec)
//-->
</SCRIPT>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC