3 ms·
I wonder when the wind up for the 2038 problem (32 bit signed int and unix epoch) starts.
by tyingq 10y ago
I wonder when the wind up for the 2038 problem (32 bit signed int and unix epoch) starts.
- tyingq 10y agoIf you're thinking it's already largely resolved, this is from 64 bit mysql. I assume similar issues exist in other software. mysql> SELECT UNIX_TIMESTAMP('2037-11-13 10:20:19'); +---------------------------------------+ | UNIX_TIMESTAMP('2037-11-13 10:20:19') | +---------------------------------------+ | 2141742019 | +---------------------------------------+ 1 row in set (0.00 sec) mysql> SELECT UNIX_TIMESTAMP('2039-11-13 10:20:19'); +---------------------------------------+ | UNIX_TIMESTAMP('2039-11-13 10:20:19') | +---------------------------------------+ | 0 | +---------------------------------------+
- otterley 10y agoSee also "System call conversion for year 2038" (https://lwn.net/Articles/643234/ https://lwn.net/Articles/643234/) for a brief discussion of the Linux case.
- raverbashing 10y agoWell, we still have 21 years to solve it
- tyingq 10y agoA bit pedantic, I suppose, but Y2K problems showed up well ahead of Y2K. Things like credit cards with expiration dates well in the future, and validation code making comparisons.
- Moru 10y agoYes, our system doesn't work on some operating systems because we for some reason use dates after 2050 as a flag for something. And that breaks together if we testrun on windows but works fine on Linux.
- stevewilhelm 10y agoUnless of course, you are trying to store the maturity date of a thirty year bond or mortgage.
- raverbashing 10y agoYou store the ISO date, you don't need a UNIX epoch to calculate that
- jdub 10y agoYou "store" it that way (as a string? no), but how are the relevant systems (database, OS, application) handling calculations with it?
- camiller 10y agothat many years ago it was probably stored on tape and processed on a mainframe by a COBOL program. No database, it was probably stored as a string, and the application would likely have been fix to handle it before it was a problem.
- acdha 10y agoThat COBOL program almost certainly _is_ a database – not a SQL database but the COBOL language standard specifies structured records and allows you to specify whether a file is sequential or indexed (see e.g. https://en.wikipedia.org/wiki/COBOL#Data_division https://en.wikipedia.org/wiki/COBOL#Data_division). In the case of Y2K, the problem was often that people defined a date filed as three values all declared as PIC 99 (i.e. a two-digit number). If they migrated to 4 digits, we're fine until Y10K. If they added a window (values less n are 19xx, etc.) or switched to Unix timestamps or a SQL database – there are products which let a COBOL runtime transparently map the indexed file semantics to SQL statements – then it requires more information to say whether it's at risk.
- wolfgang42 10y ago
- Splines 10y agohttp://stackoverflow.com/questions/12067697/convert-current-date-as-integer http://stackoverflow.com/questions/12067697/convert-current-... One of the top results for "convert date to integer". People who have an integer on one hand, a datetime on the other are going to see this code and use it (hey, it works) without understanding the ramifications. I suppose one can only hope that such code is brittle enough that other problems bring it down before 2038.
- Manozco 10y agoWorks in PostgreSQL 9.6.1 postgres> SELECT extract(epoch from to_timestamp('2037-11-13 10:20:19', 'YYYY-MM-DD hh24:mi:ss')); date_part ------------ 2141720419 (1 row) postgres> SELECT extract(epoch from to_timestamp('2039-11-13 10:20:19', 'YYYY-MM-DD hh24:mi:ss')); date_part ------------ 2204792419 (1 row)
- fanf2 10y agoAt least 10 years ago... http://thedailywtf.com/forums/thread/78254.aspx http://thedailywtf.com/forums/thread/78254.aspx http://www.mail-archive.com/aolserver@listserv.aol.com/msg09844.html http://www.mail-archive.com/aolserver@listserv.aol.com/msg09...