#include <iostream>
/* time example */
#include <stdio.h>
#include <time.h>
int main ()
{
time_t seconds;
seconds = time (NULL);
printf ("%ld hours since January 1, 1970 \n", seconds);
printf ("%ld hours since January 1, 1970 \n", seconds/3600);
printf ("%ld \n", seconds/3600-262800);
// give the user a chance to look things over before quitting
system("pause");
return 0;
}
So what's the problem? If you want seconds, then why are you messing around with hours?
There's more than 262800 hours between 1.1.1970 and 1.1.2000, by the way.
#include <iostream>
/* time example */
#include <stdio.h>
#include <time.h>
usingnamespace std;
int main ()
{
time_t seconds;
seconds = time (NULL);
printf ("%ld seconds since January 1, 2000 \n", seconds-946080000);
cout << hex << seconds-946080000 << endl;
// give the user a chance to look things over before quitting
system("pause");
return 0;
}