[{"data":1,"prerenderedAt":186},["ShallowReactive",2],{"page:/guides/year-2038-problem":3},{"id":4,"title":5,"body":6,"description":172,"extension":173,"eyebrow":174,"faq":175,"locale":176,"meta":177,"navigation":178,"pageType":179,"path":180,"related":175,"seo":181,"stem":184,"__hash__":185},"pages/en/guides/year-2038-problem.md","The Year 2038 problem",{"type":7,"value":8,"toc":161},"minimark",[9,14,23,27,30,34,37,41,91,100,103,107,110,113,117,125,138,142],[10,11,13],"h2",{"id":12},"the-boundary","The boundary",[15,16,17,18,22],"p",{},"A signed 32-bit integer can store values from −2,147,483,648 through 2,147,483,647. Interpreted as Unix seconds, the positive limit is ",[19,20,21],"code",{},"2038-01-19T03:14:07Z",". Adding one second overflows that representation.",[10,24,26],{"id":25},"who-should-check","Who should check",[15,28,29],{},"Legacy operating systems, embedded devices, database columns and binary protocols may still use signed 32-bit seconds. A 64-bit timestamp or a suitable date type moves the practical boundary far beyond ordinary application lifetimes.",[10,31,33],{"id":32},"testing","Testing",[15,35,36],{},"Test values on both sides of the boundary through the complete stack: parser, storage, API serialization, client runtime and reporting tools. A modern application server does not protect an older database column or device protocol.",[10,38,40],{"id":39},"verify-the-boundary","Verify the boundary",[42,43,44,57],"table",{},[45,46,47],"thead",{},[48,49,50,54],"tr",{},[51,52,53],"th",{},"Unix seconds",[51,55,56],{},"UTC",[58,59,60,71,81],"tbody",{},[48,61,62,68],{},[63,64,65],"td",{},[19,66,67],{},"2147483646",[63,69,70],{},"2038-01-19 03:14:06",[48,72,73,78],{},[63,74,75],{},[19,76,77],{},"2147483647",[63,79,80],{},"2038-01-19 03:14:07",[48,82,83,88],{},[63,84,85],{},[19,86,87],{},"2147483648",[63,89,90],{},"2038-01-19 03:14:08",[15,92,93,94,99],{},"The third value is a valid timestamp in a wider representation. It exceeds the maximum signed 32-bit integer, not the definition of Unix time. This site's ",[95,96,98],"a",{"href":97},"/timestamp-to-date/","timestamp converter"," can display it when seconds is selected.",[15,101,102],{},"A signed 32-bit value ranges from −2,147,483,648 to 2,147,483,647. If an old system wraps rather than rejecting overflow, the next value can become a negative number and appear in 1901. The exact failure depends on the language, operating system and storage format.",[10,104,106],{"id":105},"audit-the-complete-storage-path","Audit the complete storage path",[15,108,109],{},"Check the database column, driver binding, API schema, serialization layer and application type. Migrating only the database column does not fix a 32-bit cast in a client or an embedded device. Test values immediately before and after the boundary, then read them back and compare the stored integer rather than only the formatted date.",[15,111,112],{},"Use an appropriate wider integer or a documented date type supported throughout the system. An unsigned 32-bit second counter has a different later boundary; it does not solve negative dates or every protocol compatibility problem.",[10,114,116],{"id":115},"distinguish-other-limits","Distinguish other limits",[15,118,119,120,124],{},"The Year 2038 problem is about signed 32-bit ",[121,122,123],"strong",{},"seconds",". JavaScript's safe-integer limit and a browser date's supported range are separate constraints. Milliseconds need a larger magnitude than seconds for the same instant; microseconds and nanoseconds may exceed a floating-point integer's exact range much sooner.",[15,126,127,128,132,133,137],{},"Use ",[95,129,131],{"href":130},"/guides/seconds-vs-milliseconds/","seconds versus milliseconds"," to choose the scale. For a migration file, the ",[95,134,136],{"href":135},"/batch-converter/","batch converter"," can check rows, but it cannot inspect or repair the types used by your external system.",[10,139,141],{"id":140},"standards-and-runtime-references","Standards and runtime references",[143,144,145,154],"ul",{},[146,147,148],"li",{},[95,149,153],{"href":150,"rel":151},"https://man7.org/linux/man-pages/man2/time.2.html",[152],"nofollow","Linux time(2)",[146,155,156],{},[95,157,160],{"href":158,"rel":159},"https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range",[152],"ECMAScript Date time range",{"title":162,"searchDepth":163,"depth":163,"links":164},"",2,[165,166,167,168,169,170,171],{"id":12,"depth":163,"text":13},{"id":25,"depth":163,"text":26},{"id":32,"depth":163,"text":33},{"id":39,"depth":163,"text":40},{"id":105,"depth":163,"text":106},{"id":115,"depth":163,"text":116},{"id":140,"depth":163,"text":141},"Why signed 32-bit Unix seconds overflow in January 2038, which systems are affected and how to check storage safely.","md","Guide / limits",null,"en",{},true,"guide","/en/guides/year-2038-problem",{"title":182,"description":183},"Year 2038 Problem Explained — Unix Timestamp Limit","Understand the signed 32-bit Unix timestamp limit at 2038-01-19 and how modern 64-bit systems avoid it.","en/guides/year-2038-problem","f5p5A4vvY7Mn20vQt3E0F2-vawQHMtIpeJGsjMcfXYY",1792032483056]