8 ms·
Epochalypse
- kimburgess 4y agoHopefully http://www.nic.now http://www.nic.now opens up soon so that this can claim epochalypse.now.
- snapplebobapple 4y agoCan someone explain why, if the start date was 1970, why is it rolling over to december 1901? Why wouldn't it roll over to the start date in 1970 again?
- sour-taste 4y agoAssuming I understand your question correctly: If the counter is stored as a signed int32 then the rollover will be to the smallest representable signed 32 which corresponds to the 1901 date. It's stored signed because software (particularly old software) wanted to be able to manipulate pre 1970 dates.
- budoso 4y agoI’d guess that it’s because it’s a signed int? So the value can be negative. Probably depends on the library implementation though.
- gs17 4y agoIt's a signed integer. The overflow will make the number negative, not zero.
- SAI_Peregrinus 4y agoAnd because it's JS. Not every language defines signed integer overflow as wrapping.
- chipsa 4y agoMost languages assume twos complement signed numbers. So an uncaught overflow will be wrapped around JS specifically won’t necessarily wrap at this point, because adding one to the Max 32 but signed int maybe be a float.
- ddmma 4y agoLet is be The Matrix boot in the simulation
- _qua 4y agoNo way this website will still be up in 15 years.
- walrus01 4y ago$12/year domain registration and $3.50/month VM would probably host it just fine if somebody remembers to set up the recurring monthly/yearly billing correctly.
- lxgr 4y agoNo need for a VM – Github Pages or similar will do just fine. It's also possible to pre-pay domain registrations for several years at most registries.
- mlhpdx 4y agoIt pains me to see websites and VMs still being conflated in this day and age.
- mfcl 4y agoI don't think the author of the comment is conflating those two terms, just comparing them. Booting a VM can be done to host a website and using GitHub Pafes can be done to do the same. Therefore they are two solutions to the same problem and can be compared.
- pavlov 4y agoIs the GitHub Pages product guaranteed to exist in its current form fifteen years from now? 15 years ago, somebody might have bet on a Yahoo! product as something that would obviously be around for a long time. It’s best not to make long-term plans on giant corporations’ products unless you’re paying them the kind of money that comes with an actual service agreement. A small VM that you can easily move to a new host is a better bet than free hosting du jour at $web_giant.
- 4y ago
- walrus01 4y agoThere's a real chance the year 2038 problem will be worse than the year 2000 problem. Huge numbers of embedded things out there with no hope of software update/new OS/patch that will do something weird in 2038.
- hn_throwaway_99 4y agoYou think 2038 will be bad, just wait for those poor saps that have to fix stuff 292 billion years from now when 64 bit integers overflow!
- Beltalowda 4y agoBy this time humans have evolved to be pure energy creates so we won't need computers any more.
- walrus01 4y agoDyson sphere problems
- codethief 4y agoExactly, consider how much legacy software will have been written by then and how they will need to patch all of it!
- Aperocky 4y agoSolved problem, most of those things will not last till then. The ones which does will be able to continue doing whatever it does in Dec 1901.
- phoehne 4y agoYou'd be surprised. PDP-11s and emulated VAXen are not for hobbyists. They're for companies that still have that PDP-11 or critical VAX they can't get rid of. It's usually in an embedded or context - like running a nuclear reactor. Sometimes things last a long-long-long time. (see https://logical-co.com/nupdpq/ https://logical-co.com/nupdpq/ or https://www.stromasys.com/solution/charon-vax https://www.stromasys.com/solution/charon-vax).
- charles_f 4y agoTurns out that epoch has been a countdown to full societal collapse after all!
- jasperry 4y agoThe leftmost bit is wrong, it should be a 0. It becomes 1 at y2k38, when the signed value will represent Jan 1 1970 minus 2^31 seconds.
- hertg 4y agoCreator of the page here, you are right of course. I just fixed it. Source code is public at https://github.com/hertg/epochalypse https://github.com/hertg/epochalypse
- asadlionpk 4y agoWe will figure it out, as we always do.
- deleted 4y ago[deleted]
- coffeebeqn 4y agoAren’t most systems 64-bit by now already? Maybe I’m too optimistic/startup focused
- lossolo 4y agoIt doesn't always help, it's about how is epoch defined in code, even on 64 bit system it can be defined as int32 and will overflow.
- tspike 4y agoSure, unless you count systems in sectors like banking, airlines, or government.
- pantalaimon 4y agoMost embedded systems are 32 bit. Yea both newlib and picolibc use 64 bit time_t now, but that doesn’t stop people from using 32 bit timestamps anyway …
- p-e-w 4y agoYes, a lot of smart and dedicated people will work tirelessly to figure it out and prevent this from turning into a disaster, and then most people will wonder what all the fuss was about since "nothing happened". I wonder if 100-200 years into the future there will be some kind of widespread "historical climate change denialism", where the efforts made to combat climate change in the 21st century are called into question because the positive outcome (which was the result of those efforts) appears to retroactively show that there was no problem in the first place.
- dismalpedigree 4y ago
- ipcress_file 4y agoI remember Y2K. I turned the date on my Windows 3.1 computer back to 1972. It wasn't connected to anything, so that was good enough.
- lukeh 4y agoWon’t it be January 1, 1970?
- zargon 4y agoWhen a two's complement number overflows it goes to the maximum (minimum?) negative value.
- aidenn0 4y agoOf course if the timer is implemented in C as a signed number, overflow is undefined, so who knows what happens. I've not seen an embedded compiler that does anything too strange though.
- lossolo 4y agoMax int32 is 2147483647 and minimum int32 is -2147483647, if you overflow you go to the beginning of the range so to -2147483647, if you subtract 2147483647 seconds from January 1 1970 you will arrive at 13 December 1901.
- lukeh 4y agoAh, thank you.
- DethNinja 4y agoIs it still int32 though? Most of the user space APIs give this value in int64 so I thought kernel would’ve kept it as int64 as well.
- chungy 4y agoYes and no. If you run modern Linux or FreeBSD even on 32-bit hardware, it does provide time64_t to userspace. Though you will have to compile programs to use time64_t on 32-bit architectures if you so choose. Both kernels have extremely strong senses of backwards compatibility (we're talking of running 30+ years of unmodified Linux and FreeBSD binaries on current iterations), and well, those binaries may or may not have 2038 problems.
- habibur 4y agoTried the following code on Linux / 64 bits. #include <time.h> #include <stdio.h> int main(){ printf("%d\n",sizeof(time_t)); } $ gcc -o time time.c $ ./time $ 8 Therefore time_t is 8 bytes at least on 64 bit systems, even when you are using default time_t and not time64_t. No idea when it was changed. 20 years back?
- panzi 4y agoThat changed when GCC compiled to 64bit binaries. Try again with -m32 or -march=i686
- habibur 4y agoDoesn't even compile with -m32. Asks for a missing header, which google indicates to install from a i386 library. I regularly compile a lot of stuff on this machine, indicating I never needed that before. So none of the software I compiled had 32 bit time_t. And we still have 15 more years to migrate anything remaining behind.
- Jorengarenar 4y ago
- virtuallynathan 4y agoHeh, I bought y2038.io and epochalypse.tech for my retirement gig.
- mholt 4y agoYesterday while writing code to parse MP4 metadata, I learned that MP4 uses an epoch from the year 1904. (I was suspicious when I saw the timestamp start with a 3). Turns out there's lots of epochs, and the Unix epoch doesn't have any "rationale" according to Wikipedia: https://en.wikipedia.org/wiki/Epoch_(computing)#Notable_epoch_dates_in_computing https://en.wikipedia.org/wiki/Epoch_(computing)#Notable_epoc... For example, Ingenuity helicopter counts from 2000.
- chungy 4y agoEarly versions of Unix moved the epoch quite frequently between various dates in the 1960s and 1970s. Version 6 finally "settled" it on 1970 and everyone has just gone with that ever since. It's somewhat arbitrary, but by making it a signed integer, Dennis Ritchie figured it was good enough to represent dates spanning his entire life time. He probably thought Unix's life time would be significantly shorter rather than outliving him.
- marvy 4y agoI thought it was settled in Version 4. Compare: https://www.tuhs.org/cgi-bin/utree.pl?file=V3/man/man2/time.2 https://www.tuhs.org/cgi-bin/utree.pl?file=V3/man/man2/time.... vs https://www.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/time.2 https://www.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/time.... EDIT: note that back then, it was a signed integer. Turns out that people wanted to be able to represent dates from before 1970 so we lost one bit.
- schoen 4y agoYou can also check https://en.wikipedia.org/wiki/Year_2038_problem https://en.wikipedia.org/wiki/Year_2038_problem for more background if you weren't familiar with this situation.
- shagie 4y agoMy favorite instance of the epoch showing up in sci-fi is A Deepness in the Sky. > Take the Traders’ method of timekeeping. The frame corrections were incredibly complex—and down at the very bottom of it was a little program that ran a counter. Second by second, the Qeng Ho counted from the instant that a human had first set foot on Old Earth’s moon. But if you looked at it still more closely…the starting instant was actually about fifteen million seconds later, the 0-second of one of Humankind’s first computer operating systems.
- aaron_m04 4y agoGood stuff. I also like this author for coining the term software-archaeologist.
- buildbot 4y agoOne if my favorite terms as well - extremely evocative
- dylan604 4y agoI'm immediately imagining the steam punk style devices that future software archaeologists will use to read things like CD-ROMs
- shagie 4y agoConsider more of: here is a BSLOC 'application' find a routine that does X and make it do X'. Continuing from the quoted passage above... > So behind all the top-level interfaces was layer under layer of support. Some of that software had been designed for wildly different situations. Every so often, the inconsistencies caused fatal accidents. Despite the romance of spaceflight, the most common accidents were simply caused by ancient, misused programs finally getting their revenge. > “We should rewrite it all,” said Pham. > “It’s been done,” said Sura, not looking up. She was preparing to go off-Watch, and had spent the last four days trying to root a problem out of the coldsleep automation. > “It’s been tried,” corrected Bret, just back from the freezers. “But even the top levels of fleet system code are enormous. You and a thousand of your friends would have to work for a century or so to reproduce it.” Trinli grinned evilly. “And guess what—even if you did, by the time you finished, you’d have your own set of inconsistencies. And you still wouldn’t be consistent with all the applications that might be needed now and then.” > “Sura gave up on her debugging for the moment. “The word for all this is ‘mature programming environment.’ Basically, when hardware performance has been pushed to its final limit, and programmmers have had several centuries to code, you reach a point where there is far more signicant code than can be rationalized. The best you can do is understand the overall layering, and know how to search for the oddball tool that may come in handy—take the situation I have here.” She waved at the dependency chart she had been working on. “We are low on working fluid for the coffins. Like a million other things, there was none for sale on dear old Canberra. Well, the obvious thing is to move the coffins near the aft hull, and cool by direct radiation. We don’t have the proper equipment to support this—so lately, I’ve been doing my share of archeology. It seems that five hundred years ago, a similar thing happened after an in-system war at Torma. They hacked together a temperature maintenance package that is precisely what we need.” > “Almost precisely.” Bret was grinning again. “With some minor revisions.”
- 0837560358 4y ago[flagged]
- deleted 4y ago[deleted]
- Thorrez 4y agoHuh? Is the number correct? For me it says 11100011 10111001 00000101 00011111 Whereas the current unix timestamp (1673069920) in binary is 01100011 10111001 00000101 01100000
- sand500 4y agoI was wondering why the first bit is 1 in the website. That would indicate a negative number since it's signed. The last few digits only represent a delta of minute or so.
- deleted 4y ago[deleted]
- drewtato 4y agoIdk why but they overwrote this in JS (https://github.com/hertg/epochalypse/blob/main/index.html#L109 https://github.com/hertg/epochalypse/blob/main/index.html#L1...) byte1.innerText = "1" + bits.substr(1, 7); Realistically the first bit should be skipped and the first part should be 7 digits.
- hertg 4y agoCreator of the page here, you are right! I made an error in my thinking when I created the site yesterday night. I just updated it. Thanks to @drewtato for letting me know in https://github.com/hertg/epochalypse/issues/1 https://github.com/hertg/epochalypse/issues/1
- 1vuio0pswjnm7 4y agoI wrote a UNIX utility called "epoch" that I use for tiny systems where I need to print the epoch but do not want to put a full-blown "date" command in the userland. Here is the code int printf(const char *__restrict, ...); unsigned int time(unsigned int *tloc); int main(){printf("%u\n",time((unsigned int *)0));}
- 1vuio0pswjnm7 4y agoOne can reduce the size of the static binary by about 50% by using return instead of printf (tested with musl) int printf(const char *__restrict, ...); unsigned int time(unsigned int *tloc); int main(){return time((unsigned int *)0);}
- d33 4y agoIf you're OK with compiler warnings, this can be golfed down to: echo 'main(){printf("%u\\n",time(0));}'>epoch.c&&make epoch
- d33 4y ago...on a separate note, wouldn't `date +%s` from coreutils do?
- danielodievich 4y agoI am a 3rd generation programmer, my grandmother programmed with punch cards, my father on mainframes, I do things now, and my child looks to be a 4th one. When we came here my father brushed off his COBOL skills during Y2K stuff and made some excellent money working at some hospital chain fixing things. Right before New Year 2000 I ask him half in jest - "so hey, should I be sick on New Year"? He looks at me, smiles, and says "you can, but not too sick, ok?". I am wondering if I'd be recompiling int32 to int64 out of systems and changing database datatypes in 10+ years and answering similar questions from my kids
- panzi 4y agoI think any somewhat actively maintained software should be fixed by now, except devices that aren't seen as computers by the users and don't even have update mechanisms. And old COBOL programs running on some bank's mainframe, of course. Did your dad teach you COBOL?
- bluesmoon 4y agoCOBOL programs will be fine. They use 4 characters just for the year since it's stored as the decimal characters. I was trained in COBOL in the late 90s to work on Y2K migrations. It's done this way so that COBOL programs stored on punched cards are readable (also why COBOL has its line-length limitations).
- __d 4y agoExcept for the programs where it was too hard to change to 4 digit years, and we just shifted the epoch ...
- danielodievich 4y agoNo, I never learned COBOL. I learn some programming from him when I was like 7 or 8, some language one would never have heard of called FOCAL https://en.wikipedia.org/wiki/FOCAL_(programming_language) https://en.wikipedia.org/wiki/FOCAL_(programming_language) which was ripped off from DEC by the soviets for their little BK-0010 https://tvtropes.org/pmwiki/pmwiki.php/UsefulNotes/BK0010 https://tvtropes.org/pmwiki/pmwiki.php/UsefulNotes/BK0010 and which I mostly used to play games loaded from tapes. Mostly I just really liked computers, just like him. He didn't stick with mainframe programming after the Y2K passed, I think he could have continued but he was bored...
- unobatbayar 4y ago> Only 15 years Was hoping it was much sooner, but at the same time a lot of my php backend code will break when this happens. What are doing about this?
- Invictus0 4y agoMy mom worked on Y2K at citigroup: she said it took a while to fix but wasn't the end of the world. What was more challenging was when they spun off travelers and switch from the old logo [0] to the one used at present. Apparently it took over 2 years to fully replace the logo because the old one was hardcoded in so many places. [0] https://s.wsj.net/public/resources/images/OB-AH222_Citi_20070213110827.jpg https://s.wsj.net/public/resources/images/OB-AH222_Citi_2007...
- toast0 4y agoSeveral years ago, Yahoo changed their logo, but before unveiling the new one, they did a reveal of a new logo everyday. Except for the logos that were stuck in old mode (and probably one version old already), it worked pretty well. As an ex-Yahoo, I was impressed.
- habibur 4y agoAt least on 64 bit Linux, time_t is defined in 64 bits. printf("%d\n",sizeof(time_t)); outputs : 8
- Joel_Mckay 4y agoWe better start preparing for Y292277026596 A lot of modern software won't even compile for 32bit targets anymore Kind of wasteful in a way, but memory is cheap these days... =)
- ben30 4y agoI’ve noticed a more subtle bug, I worked for a company where the expire date for a lot of assets was 2038. The database supports later dates, but something upstream has the problem.
- fmeyer 4y agoI was searching for a goal retirement date, it fits perfectly.
- harry8 4y agoDoes anyone think the y2k con will work a second time? Does anyone think it was actually not a con given there was essentially zero difference in outcome between companies and indeed whole countries who spent heavily to deal with it and those who did absolutely nothing? I do realise I'm impugning the idea that Arthur Andersen and similar consultants put customers interests first and that isn't something that should be done too lightly. I guess y2k certified compliant cables aren't as utterly, hyperboically and comically absurd as they were then.
- ErrantX 4y agoSide note; There is something particularly pleasing/calming about watching a binary counter.
- KronisLV 4y agoI feel like a lot of these issues will disappear for a long time, after the switch to 64 bits: bits max value 8 bits 255 16 bits 65_535 32 bits 4_294_967_295 64 bits 18_446_744_073_709_551_615 128 bits 340_282_366_920_938_463_463_374_607_431_768_211_455 And that applies to most things: time stamps: 64 bits can fit hundreds of billions of years (longer than the age of the universe) IP addresses: an address for every device, no more CGNAT, the block assignment sizes are mindboggling (/64) DB primary keys: it's unlikely that most systems out there will need more than 18 quintillion records coordinates: whether you're working on video game worlds, or simulations, this is probably accurate enough for floating point calculations and storage hardware: millions of TB of RAM is also likely to be sufficient when using 64 bit OSes I feel like once the switch is made in most places, we're all going to have a more relaxed experience for a while. For example, currently if I try to create a game where the game engine uses 32 bit floats, then after a certain distance away from the scene root point, the physics break down a bit due to the decreasing accuracy. That's how you get the complexity of floating origin systems where you reset the camera/player back to the root point, alongside everything else relative to them, after they've moved a certain distance away. With 64 bit values, there would be no need for the complexity of such workarounds. And it's pretty much the same for computer networking (the whole NAT/CGNAT thing), dates and everything else, where you actually run into the limitation of 32 bits not being enough.
- trinovantes 4y agoDownside is you lose a fair amount of performance switching to 64 bit floats especially on low-end hardware
- KronisLV 4y ago> Downside is you lose a fair amount of performance switching to 64 bit floats especially on low-end hardware Think we'll run into a bit of a plateau eventually? I mean, once we support 64 bit, in many domains we won't need to go much further, which means that hardware just needs to catch up. Of course, Moore's law is somewhat dead otherwise and Wirth's law is still very much alive, so that's a bit worrying, but I can feasibly imagine eventually getting to a point where 64 bit makes sense in most cases (maybe even embedded in a few decades, who knows) and that's that.
- turing_complete 4y agoThis is when the singularity will happen
- giovannibonetti 4y agoI wonder how much effort it would take to make it an unsigned int. This would delay the problem for long enough until it becomes irrelevant.
- austinnguyen00 4y agoCan't wait to see what the future holds for unix epoch time. Will we see a new, more advanced system take its place?
- meisel 4y agoWhy did they decide to use a signed int and not an unsigned one
- alanbernstein 4y agoThey were thinking ahead. Half as much software to eventually fix.
- School-Cotton 4y ago> Why did they decide to use a signed int To represent dates before 1970-01-01. Unix time isn’t only used for the present or recent past. For example, you might have a database where people’s dates of birth are stored as Unix timestamps.
- ChrisArchitect 4y agoThis is the 2038 problem right?
- ChrisArchitect 4y agoAh yes (https://en.wikipedia.org/wiki/Year_2038_problem https://en.wikipedia.org/wiki/Year_2038_problem), just never heard it referred to as the Epochalypse. Always chuckle at this bot that posts progress updates .. https://twitter.com/countdownY2K38 https://twitter.com/countdownY2K38