+ 1

Can someone tell me why time in JavaScript and somewhere in c++ starts from 01 January 1970?

Time

13th Sep 2019, 5:54 PM
Kisembo Allan
Kisembo Allan - avatar
2 odpowiedzi
+ 3
That is one of the epochs used in unix systems and it is the first one that Ken Tompson chose for time back in the day. Its used in lot of places because of how predominant and widespread unix is. But its not the only epoch there are lot of others. All time libraries measire time as seconds or miliseconds elapsed from epoch. So in js and c++ thats why time 0 is jan1 1970, cuz thats where unix epoch starts. If u do that in ms excel its 1990 if i am not mistaken.
13th Sep 2019, 6:14 PM
David Tsulaia
David Tsulaia - avatar
+ 1
A simple google research on my laptop gave me the results, I'm too lazy to write down the answer here
13th Sep 2019, 6:13 PM
Aymane Boukrouh
Aymane Boukrouh - avatar