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.
Hey, Al Gore's first invention!
1451870040
2038. Most are not ready, but the big boys are.
I hate UNIX. Men should have their testicular bits in working order.
How much is that in dog years?
1451870344
Time marches on!
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.
1,500,000,000 UNIX = Friday 14-Jul-2017 02:40:00 UTC = Thursday 13 July 2017 22:40 ET
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.
> ...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?
No, 1451873680
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.
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?"
Whoopsie indeed!!
Yep. The problems with "simply" going to an unsigned representation, however, include:
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.