0

if I print time(0)/3600/24/365 it displays 46 what does that mean?

time()

18th Sep 2016, 2:33 AM
Balaji Rs
Balaji Rs - avatar
2 Answers
+ 3
It means that the start of Unix time was 46 years ago, in 1970. time(0) gives you the number of seconds since the 1st January, 1970 (UTC). Dividing by 3600 gives you the hours. Dividing by 24 gives you the days. Dividing by 365 gives you the years.
18th Sep 2016, 9:49 AM
Zen
Zen - avatar
0
how Unix related to CPP?
18th Sep 2016, 9:52 AM
Balaji Rs
Balaji Rs - avatar