SirChick Posted September 26, 2008 Share Posted September 26, 2008 I have a question about date time format... im told that after the year 2038 they will pose some kind of problem due to the size of the number or something like this! This is the quote i read from a guy on a forums: You must change them if you think that your program will be alive in 2038. What is exactly the problem of Unix time I don't know. I read that the Unix time cannot represent dates after 2038 year. I think that it is the problem of number of bytes designed for date_time. Unix stamp = number of seconds passed after 01-01-1970 till current date. Is the guy mis-informed? Can any one explain to me slightly more detailed what he means by this problem just out of curiosity here. edit: yes im aware by then im sure it won't matter due to new allowance of more bits as technology increases (im assuming its related to 32 bit operating systems that limit it at the moment) but just wanted to know tis all. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/ Share on other sites More sharing options...
kenrbnsn Posted September 26, 2008 Share Posted September 26, 2008 On 32 bit systems, time is represented by the number of seconds since January 1, 1970 and is stored in 31 bits. This number will overflow in January of 2038. See this wikipedia article. Or just do a Google search for 2038 Ken Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651030 Share on other sites More sharing options...
corbin Posted September 26, 2008 Share Posted September 26, 2008 I seriously doubt that any application from now will still be widely used in 2038. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651498 Share on other sites More sharing options...
AndyB Posted September 26, 2008 Share Posted September 26, 2008 I seriously doubt that any application from now will still be widely used in 2038. Probably very similar to what someone said about years as two digits back in the 70's ... and look what a problem that caused. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651548 Share on other sites More sharing options...
corbin Posted September 26, 2008 Share Posted September 26, 2008 Touché. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651570 Share on other sites More sharing options...
kenrbnsn Posted September 27, 2008 Share Posted September 27, 2008 The problem isn't that code written today is going to be used 30 years from now. It's that there is code being written now that may have to handle dates 30 years in the future -- think mortgages -- normal mortgages run for 30 years, so there may already be software that needs to handle this. Ken Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651680 Share on other sites More sharing options...
corbin Posted September 27, 2008 Share Posted September 27, 2008 Hrmmm good point.... 8+30 = 38. This could get interesting. Wonder where we'll go from 32 int timestamps... I guess 64 bit timestamps would be the most logical. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651707 Share on other sites More sharing options...
Daniel0 Posted September 27, 2008 Share Posted September 27, 2008 64-bit is good enough. We'll run out of time on December 4, 292277026596. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651737 Share on other sites More sharing options...
DarkWater Posted September 27, 2008 Share Posted September 27, 2008 64-bit is good enough. We'll run out of time on December 4, 292277026596. I lol'd. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-651908 Share on other sites More sharing options...
corbin Posted September 28, 2008 Share Posted September 28, 2008 I hate that someone actually divided 2^61 out. (Oh, why don't we use int unsigned, by the way? Do people ever use negative unix timestamps to denote before the epoch?) Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-652196 Share on other sites More sharing options...
Daniel0 Posted September 28, 2008 Share Posted September 28, 2008 (Oh, why don't we use int unsigned, by the way? Do people ever use negative unix timestamps to denote before the epoch?) Eh, yeah. Take birthdays for instance. There are people who are over 38 years old you know Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-652222 Share on other sites More sharing options...
GingerRobot Posted September 28, 2008 Share Posted September 28, 2008 Eh, yeah. Take birthdays for instance. There are people who are over 38 years old you know Really?! Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-652244 Share on other sites More sharing options...
dropfaith Posted September 28, 2008 Share Posted September 28, 2008 over 38? thats insane can those people even function computers? i mean they are like insanly old and probably crippled right? haha Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-652248 Share on other sites More sharing options...
corbin Posted September 28, 2008 Share Posted September 28, 2008 Hrmmm true, but in some situations a uint would work fine.... Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-652336 Share on other sites More sharing options...
CroNiX Posted September 28, 2008 Share Posted September 28, 2008 There are still banking systems using code written in the 60's. A lot was updated for y2k, but some still use it. Quote Link to comment https://forums.phpfreaks.com/topic/125892-date-time-format/#findComment-652359 Share on other sites More sharing options...
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.