We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Help with timer for website
Page Index Toggle Pages: 1
Help with timer for website (Read 535 times)
Help with timer for website
Oct 17th, 2009, 6:36pm
 
Hi everyone,

I'm trying to make a timer for a friends website which updates in real time (in relation to the computer's clock) the years, months, days, hours, minutes and seconds passed since the moon landing of July 20, 1969 (assuming the landing was at the start of that day). I've seen a few examples of timers that start from zero but none that start years before...

I'm pretty stuck right now so I would really appreciate any help/advice anyone can offer!

Thanks
J
Re: Help with timer for website
Reply #1 - Oct 17th, 2009, 6:51pm
 
Helpful sections in reference are going to be "Time & Date" and "Relational Operators"...
Re: Help with timer for website
Reply #2 - Oct 18th, 2009, 1:32am
 
you can use the unix timestamp to calculate the difference between the date of the moonlanding and the actual time. and then convert these in days, hours, minutes, seconds,

moon landing was on (00:00:00 clock)

The timestamp -14230800 corresponds to
1969/07/20 12:00:00 am PDT.

http://www.glassgiant.com/geek/unix-timestamp/
Page Index Toggle Pages: 1