Ask Your Question
1

Why did Linux / Unix choose 1 Jan 1970 as starting day

asked 2019-03-28 16:59:38 -0500

lsatenstein gravatar image

If you run cal 1970, 1 January 1970 is shown as a Thursday. I would also call that the Thursday of week 0 If anyone wants to work with weeks or days, that begin on Sunday, then for whatever purpose one has to subtract 4 days from the date calculated as (date +%s / 86400)
or add 4 days of seconds.

date +%s gives the seconds since midnight 1 Jan 1970. If we divide by 86400 (seconds in a day), we get with integer arithmetic, 17681 If we add 4*86400, 19684 mod 7 gives 0, for Sunday. (days past beginning of Sun=4,mon=3,tue=2,wed=1) Note as well, that the seconds are given as UTC time.

Would it have made sense to have the actual start date of Unix/Linux as Sunday December 28, 1969.?

edit retag flag offensive close merge delete

Comments

The week begins on Monday, Sunday is the day dadicated to our Lord Jesus. Moreover, since I was born some day in 1970 it's good that those very clever folks choose 1 Jan 1970 as starting day. Besides, not enough bits those days for starting from the Big Bang.

fcomida gravatar imagefcomida ( 2019-03-28 18:08:51 -0500 )edit
1

@lsatenstein, if you're interested in why, results of the cursory search:

wikipedia article gives a bit of history (but not much), in particular it says that starting day was actually moved several times.

And actually more informative and interesting, i'd say (though I have no time right now to read it through), -- is this unix.stackexchange.com question (with links to actual articles and some thoughts on the matter).

Night Romantic gravatar imageNight Romantic ( 2019-03-29 06:51:00 -0500 )edit

@lsatenstein Thanks..Have a nice day!!

simmon gravatar imagesimmon ( 2019-03-30 11:56:16 -0500 )edit

@fcomida, that may be true in your religion, but not everybody here shares it. Also, it has nothing to do with the question. In the future, please keep your religious beliefs out of the discussion.

sideburns gravatar imagesideburns ( 2019-03-30 14:06:23 -0500 )edit

@sideburns so what? Is a joke now worth a such severe reply? Amazing.

fcomida gravatar imagefcomida ( 2019-03-30 15:09:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-03-28 19:48:05 -0500

sideburns gravatar image

It probably would have made more sense to start the Unix Epoch on a Sunday, but from what I can tell, the date was picked arbitrarily, and was changed several times. It also would have been better if time_t had been defined as an unsigned integer rather than signed. For a similar system that was done right, look up the Julian Day. The three cycles that were used to calculating its starting point are completely arbitrary, but they serve the purpose of making it possible for anybody to calculate the start point for themselves and put that date far enough in the past that negative numbers are highly unlikely.

edit flag offensive delete link more

Comments

@sideburns Thank answer and explains a lot...have a nice day!

simmon gravatar imagesimmon ( 2019-03-30 11:58:58 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-03-28 16:59:38 -0500

Seen: 123 times

Last updated: Mar 28 '19