ClassicHasClass Posted January 9, 2013 Report Share Posted January 9, 2013 One of the bugs I fixed in Classilla 9.3.2 was an issue with cookies far in the future overflowing the 32-bit time value in the classic Mac OS. Interestingly, this value is unsigned, unlike the regular time_t in OS X, which is signed. It is well-known that 32-bit time_t values have a Y2038 problem, because (counting from the Unix epoch start date of midnight 1 Jan 1970) the signed 32-bit quantity (thus 31 bits) will overflow on 19 January 2038 at 3:14:07am GMT. This is true of all 32-bit Mac OS X kernels as well, which includes 10.4, 10.5 and 32-bit 10.6, PPC or Intel, so every Power Mac running OS X and early Intel Macs will be affected. 64-bit OS X kernels use a 64-bit time_t and are not affected. You can prove this by looking at /usr/include/time.h, where time_t is defined as __darwin_time_t, and i386/_types.h and ppc/_types.h both define it as long (not long long). You would expect that the classic Mac OS would be worse, because its epoch starts at midnight 1 Jan 1904. But because it has that extra bit of precision not used for the sign, it will overflow on ... 6 February 2040 at 6:28:15am local time. Yes, that's right, Boy Scouts and others who wish to be prepared. You will survive the Y2038 apocalypse with the SE/30 you should recap and stick in your fallout shelter, or the MDD you have already reformatted and installed 9.2.2 on. Now, the hacks part: it should be possible to write an extension to transparently handle this, at least for the menu bar clock. Programs that compute based on their own epoch assumptions would fail, but Classilla 194.38.2 will have this support. See you in the bunker in 37 years. Quote Link to post Share on other sites
Anonymous Freak Posted January 9, 2013 Report Share Posted January 9, 2013 See you in the bunker in 37 years. You mean 27 years. Quote Link to post Share on other sites
ClassicHasClass Posted January 10, 2013 Author Report Share Posted January 10, 2013 Er, yes. Quote Link to post Share on other sites
onlyonemac Posted January 10, 2013 Report Share Posted January 10, 2013 So, how did you get around it? Quote Link to post Share on other sites
ClassicHasClass Posted January 10, 2013 Author Report Share Posted January 10, 2013 I put a hard cap on how far in the future the cookie would be stored (in this case, the limit of Mac OS). A proper solution would have been to implement a 64-bit time on Mac OS, but this would probably have had some undesirable complications and would not have fixed the OS issue. Quote Link to post Share on other sites
uniserver Posted January 10, 2013 Report Share Posted January 10, 2013 See you in the bunker Cool! You have a bunker? That reminds me, is there any mac that was ever hardened to better handle an EMP? just curious. Quote Link to post Share on other sites
resx Posted January 11, 2013 Report Share Posted January 11, 2013 That reminds me, is there any mac that was ever hardened to better handle an EMP? just curious. Yes. Although not really designed with an EMP in mind, it was designed to stop people from using Van Eck phreaking to "eavesdrop" on the business of others via the electromagnetic emissions. Quote Link to post Share on other sites
directive0 Posted January 11, 2013 Report Share Posted January 11, 2013 YES! I love that Tempest SE/30! Best part of Watchmen. Quote Link to post Share on other sites
MacintoshMan1999 Posted November 8, 2018 Report Share Posted November 8, 2018 What Macintosh’s and Systems would this fix work on? (I have a Mac Plus w/ System 6.0.3) Quote Link to post Share on other sites
CC_333 Posted November 9, 2018 Report Share Posted November 9, 2018 17 hours ago, MacintoshMan1999 said: What Macintosh’s and Systems would this fix work on? Presumably any that use unsigned 32-bit time values (I *think* this includes all SSW dating back to '84). c Quote Link to post Share on other sites
MacintoshMan1999 Posted November 10, 2018 Report Share Posted November 10, 2018 18 hours ago, CC_333 said: Presumably any that use unsigned 32-bit time values (I *think* this includes all SSW dating back to '84). Neat, How could I resolve this issue when the year 2038 is upon us? Just wondering in advance. Quote Link to post Share on other sites
CC_333 Posted November 10, 2018 Report Share Posted November 10, 2018 8 minutes ago, MacintoshMan1999 said: How could I resolve this issue when the year 2038 is upon us? I haven't a clue c Quote Link to post Share on other sites
Paralel Posted November 10, 2018 Report Share Posted November 10, 2018 As far as I'm aware, it's in the Mac Toolbox, so it's in the ROM. In that case, there is nothing you can do. I don't think you could patch the Toolbox in a way that would make it compatible with the OS and/or software, but I could also be wrong about that (Mac Toolbox is not one of my areas of expertise. If I'm wrong about that, then it is determined by your system version, Apple changed the drop dead year every so many versions starting with 7.1. I think with System 9 it was moved up to 2099 or something, so, honestly, none of us will be around to have a problem with it. Quote Link to post Share on other sites
Dog Cow Posted November 10, 2018 Report Share Posted November 10, 2018 (edited) 16 hours ago, Paralel said: As far as I'm aware, it's in the Mac Toolbox, so it's in the ROM. In that case, there is nothing you can do. I don't think you could patch the Toolbox in a way that would make it compatible with the OS and/or software, but I could also be wrong about that (Mac Toolbox is not one of my areas of expertise. The Operating System and Toolbox dispatch tables are in RAM, so any OS or Toolbox trap can be patched or completely replaced. You would have to establish a new epoch, and a cut-off as well to make sure all dates from 1980s to 2038 still resolve correctly too. Pseudo code would look like: if (timestamp < x) { use_new_post_2038_epoch(); } else { use_old_1904_epoch(); } 'x' would probably be some timestamp resolving to 1980 or so under the current 1904 epoch. Edited November 10, 2018 by Dog Cow Quote Link to post Share on other sites
Paralel Posted November 10, 2018 Report Share Posted November 10, 2018 (edited) Ah, I see, Makes sense to me. I guess classic mac's will be working long after I'm gone then. I wonder how long before Y2k38 people will get on board with checking compliance on embedded systems, etc... I'm guessing 2-3 years. Edited November 10, 2018 by Paralel Quote Link to post Share on other sites
MacintoshMan1999 Posted November 11, 2018 Report Share Posted November 11, 2018 My Macs year stops at 2020 and then rolls over to 1921, just checked. Quote Link to post Share on other sites
CC_333 Posted November 11, 2018 Report Share Posted November 11, 2018 On 11/9/2018 at 8:54 PM, Paralel said: I think with System 9 it was moved up to 2099 or something, so, honestly, none of us will be around to have a problem with it. Don't be so sure! Those who were born within the last 18 years just might make it there!! Not to mention the people born between now and then who might take an interest in old Macs.... c Quote Link to post Share on other sites
Paralel Posted November 17, 2018 Report Share Posted November 17, 2018 On 11/11/2018 at 4:35 PM, CC_333 said: Don't be so sure! Those who were born within the last 18 years just might make it there!! Not to mention the people born between now and then who might take an interest in old Macs.... c True. I guess I just hand waved it because I won't be around, so, I just think of it as someone else's problem. Quote Link to post Share on other sites
CC_333 Posted November 19, 2018 Report Share Posted November 19, 2018 Indeed. Most of us won't be there most likely (but who knows?), so it will be someone else's problem... unless someone wants to fix it now, in a time where there's still a few people around who actually know how. c Quote Link to post Share on other sites
MacintoshMan1999 Posted November 26, 2018 Report Share Posted November 26, 2018 On 11/18/2018 at 11:15 PM, CC_333 said: Indeed. Most of us won't be there most likely (but who knows?), so it will be someone else's problem... unless someone wants to fix it now, in a time where there's still a few people around who actually know how. c Well then, I should probably learn how. Just to carry on. Quote Link to post Share on other sites
NJRoadfan Posted November 26, 2018 Report Share Posted November 26, 2018 The UNIX epoch problem has already been a problem and solved in many systems. The end date for 30 year mortgages for instance...... Quote Link to post Share on other sites
snes1423 Posted December 16, 2020 Report Share Posted December 16, 2020 if they would be able to extend the year why not make it to 9999 and when thats over (hopefully if humanity doesn't keel over somehow) and then have it loop back to 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.