Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Happy 1.5 Billion Unix Seconds
Motherboard ^ | 2 January 2016 | Michael Byrne

Posted on 01/03/2016 5:05:34 PM PST by ShadowAce

On Jan. 1, 1970, Unix time was born. It didn't actually exist on that day; the Unix operating system only kind of/sort of existed then anyhow. But when the first edition of the Unix manual was released in 1971, it was thus declared that the beginning of Unix time—the Unix epoch, correctly—hath began on New Year's Day, 1970.

Maybe you've heard of the Unix epoch. Simply, it's the reference date that Unix-based computers use to tell time. It is just a count of the number of seconds that have elapsed since the beginning of the epoch. If you're running a Unix or Unix-like machine, you can get this count in its raw form by entering "date +%s" at the command line/terminal. ("Date" by itself will just give you the boring old date-date.) As of this writing, we're at 1,451,688,846 seconds.

And now 1,451,689,116 seconds. We're getting close.

It's a simple system. Every day a new 86,400 seconds turn over. The Unix time system is agnostic about things like the day of the week, the month, the hour, or really any of the trappings of human timekeeping. The Unix clock is agnostic about Earth's orbit around the Sun, and Earth's rotation about its axis. It's just a counter.

The downside is that Unix time doesn't account for leap seconds, which are the consequence of Earth's rotation not being quite on the money, e.g. not taking exactly 86,400 seconds to make one full spin. It might take an extra few milliseconds here and there because it's a great big-ass planet and doesn't care much about our timekeeping methods.

Leap seconds are slipped into Unix time only very rarely. The clock might tick only once for two seconds, or it might not tick at all for a single second. Nothing is ever added or subtracted from it, which is a system that keeps a lot of stuff from breaking.

Speaking of breaking, Unix time runs into a problem at 03:14:07 UTC on 19 January 2038. The 2038 epochalypse will occur when the Unix time counter overflows the limits of the 32-bit integer data type (at 2,147,483,647 seconds). Time will just rollover to 0 and start again.

Upgrading the epoch system from the 32-bit formats to a 64-bit format won't be easy, especially given how many embedded ("Internet of Things") devices are expected to be around by then. Sneaking an unupgraded date format through in the guts of a smart-dishwasher is a whole lot easier to imagine than an iPad or laptop. But we also don't have much of a choice.


TOPICS: Computers/Internet
KEYWORDS: time; unix
Navigation: use the links below to view more comments.
first 1-2021-24 next last

1 posted on 01/03/2016 5:05:34 PM PST by ShadowAce
[ Post Reply | Private Reply | View Replies]

To: rdb3; Calvinist_Dark_Lord; JosephW; Only1choice____Freedom; amigatec; Ernest_at_the_Beach; ...

2 posted on 01/03/2016 5:05:47 PM PST by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce; AdmSmith; AnonymousConservative; Berosus; bigheadfred; Bockscar; cardinal4; ColdOne; ...
Hey, Al Gore's first invention!

3 posted on 01/03/2016 5:11:15 PM PST by SunkenCiv (Here's to the day the forensics people scrape what's left of Putin off the ceiling of his limo.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

1451870040


4 posted on 01/03/2016 5:12:36 PM PST by Stentor (#Mummers lives matter.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

2038. Most are not ready, but the big boys are.


5 posted on 01/03/2016 5:12:39 PM PST by soycd
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

I hate UNIX. Men should have their testicular bits in working order.


6 posted on 01/03/2016 5:14:10 PM PST by West Texas Chuck (OBAMA: Fundamentally Twerking America)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

How much is that in dog years?


7 posted on 01/03/2016 5:17:29 PM PST by 1rudeboy
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

1451870344

Time marches on!


8 posted on 01/03/2016 5:17:41 PM PST by proxy_user
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce
Speaking of breaking, Unix time runs into a problem at 03:14:07 UTC on 19 January 2038. The 2038 epochalypse will occur when the Unix time counter overflows the limits of the 32-bit integer data type (at 2,147,483,647 seconds). Time will just rollover to 0 and start again.

I doubt there will be very many 32 bit computers in 2038. Besides, we already went through this exact problem with VMS back in the 90's. It's no big deal.

9 posted on 01/03/2016 5:27:33 PM PST by SeeSharp
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

1,500,000,000 UNIX = Friday 14-Jul-2017 02:40:00 UTC = Thursday 13 July 2017 22:40 ET


10 posted on 01/03/2016 5:32:14 PM PST by Lonesome in Massachussets (Islam is the greened eyed monster that doth mock the meat it feeds upon.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

As much as people enjoy bashing Windows I sure don’t miss Unix at all. And I’m a late comer to Unix. Started using it in 1999 when I started my engineering career in aviation and manufacturing with Unigraphics. It was hard enough knowing aeronautical engineering let alone the IT experience needed to operate Unix machines.


11 posted on 01/03/2016 5:46:45 PM PST by Organic Panic
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce
I can't believe nobody caught this:
> ...the Unix time counter overflows the limits of the 32-bit integer data type (at 2,147,483,647 seconds). Time will just rollover to 0 and start again.
NO IT WON'T. The integer is SIGNED, meaning the "time" will jump to the negative limit of the 32-bit two's-complement, which is roughly the evening of Dec 13, 1901. It won't be Jan 1, 1970 for another 69 years.

Right?

12 posted on 01/03/2016 5:51:23 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

13 posted on 01/03/2016 5:52:15 PM PST by COBOL2Java (I'll vote for Jeb when Terri Schiavo endorses him.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Stentor

No, 1451873680


14 posted on 01/03/2016 6:12:28 PM PST by ProtectOurFreedom (For those who understand, no explanation is needed. For those who do not, no explanation is possible)
[ Post Reply | Private Reply | To 4 | View Replies]

To: dayglored
You are correct, for anyone using signed 32 bit 2's compliment representation.

It wouldn't roll over to zero unless they were using unsigned, and that wouldn't roll over (for 32 bits) until 4 billion ticks and change.

15 posted on 01/03/2016 6:14:21 PM PST by ThunderSleeps (Stop obarma now! Stop the hussein - insane agenda!)
[ Post Reply | Private Reply | To 12 | View Replies]

To: dayglored
I was just checking on your assertion and found this integer roll over problem on Wikipedia. Whoopsie!
On 30 April 2015, the Federal Aviation Authority announced it will order Boeing 787 operators to reset its electrical system periodically, to avoid an integer overflow which could lead to loss of electrical power and ram air turbine deployment, and Boeing is going to deploy a software update in the fourth quarter.[11] The European Aviation Safety Agency followed on 4 May 2015.[12] The error happens after 2³¹ centiseconds (248.55134814815 days), indicating a 32 bit signed integer.

11. "F.A.A. Orders Fix for Possible Power Loss in Boeing 787". New York Times. 30 April 2015.

That's every 8 months! On a brand new aircraft! You'd think the flight software guys would be aware of simple problems like this by now. "Captain, when did we last reboot the flight computers?"

16 posted on 01/03/2016 6:20:25 PM PST by ProtectOurFreedom (For those who understand, no explanation is needed. For those who do not, no explanation is possible)
[ Post Reply | Private Reply | To 12 | View Replies]

To: ProtectOurFreedom
That's supposed to be 231 centiseconds
17 posted on 01/03/2016 6:22:07 PM PST by ProtectOurFreedom (For those who understand, no explanation is needed. For those who do not, no explanation is possible)
[ Post Reply | Private Reply | To 16 | View Replies]

To: ProtectOurFreedom

Whoopsie indeed!!


18 posted on 01/03/2016 6:32:45 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 16 | View Replies]

To: ThunderSleeps
> You are correct, for anyone using signed 32 bit 2's compliment representation. It wouldn't roll over to zero unless they were using unsigned, and that wouldn't roll over (for 32 bits) until 4 billion ticks and change.

Yep. The problems with "simply" going to an unsigned representation, however, include:

  1. Incompatibility with all other software and filesystems that use the time_t signed int representation, and
  2. Inability to represent dates prior to 1970.
Those are likely not problems for, say, an embedded system which doesn't deal with dates before 1970 and doesn't interact with any other software that would interpret values in the "upper half" of the unsigned int range as "negative". But that's a relatively small percentage of systems.
19 posted on 01/03/2016 6:48:30 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 15 | View Replies]

To: Organic Panic
"It was hard enough knowing aeronautical engineering let alone the IT experience needed to operate Unix machines."

Installing Linux is easier now than installing Windows. It's very easy to use, too.


20 posted on 01/03/2016 7:29:37 PM PST by familyop ("Welcome to Costco. I love you." --Costco greeter in "Idiocracy," example of today's politico.)
[ Post Reply | Private Reply | To 11 | View Replies]


Navigation: use the links below to view more comments.
first 1-2021-24 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson