i am making a timer that tells me how many seconds, minutes, hours, days and years ago the titanic sunk i am confused on where to start the calculation. It sank at 2:20 AM on April 10th 1912, i was thinking of doing liek a start and end time kind of like this old code i found, but how do i set the start time?
Epoch time is based on the number of seconds since 1/1/1970.
First determine the number of seconds since 2:20 AM on April 10th 1912 to 1/1/1970.
Then, each time you run the program, add the number of seconds since 2:20 AM on April 10th 1912 to the current Epoch time to get the number of seconds since the Titanic sank.
*edit* My count from 2:20 AM on April 10th 1912 to 1/1/1970 is 30362320 minutes.
21071 normal days in years
14 leap years
less
2 hours 20 mins
I didn't try too hard to confirm that so you might want to check math.
So my guess is the Titanic sunk roughly Titanic Sunk = 3200825128 seconds ago and counting....