Thread: What is year 2038 bug?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    22

    What is year 2038 bug?

    Hi all
    The Topic is What is "YEAR 2038 BUG"?
    Answer of this question is following

    A> That Is Me (My Id)

    B> It is similar to Y2k problem.It will occur just a second after
    Tue 19 jan 03:14:07 2038.This will effect the system which use POSIX time system(Time system used in UNIX).

    WHY POSIX: It actually represent the time and date in number of seconds since 1 january 1970.so the problem is it uses 32 bit signed integer (that the max capablity which 32 bit microprocessor can handle) for repesentation of time and date.The max combination can occur is 2 to the power 31 which is equal to 2147483647. SO this means that at tue 19 jan 03:14:07 2038 it will reperesent it as 2147483647 and just a second after it,it will be -2147483648 which changes date to Fri 13 Dec 20:45:52 1901. So some also call it as 13th friday bug.

    Here a programme which I found in a site for this problem
    Code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <time.h>
    
    int main (int argc, char **argv)
    {
        time_t t;
        t = (time_t) 1000000000;
        printf ("%d, %s", (int) t, asctime (gmtime (&t)));
        t = (time_t) (0x7FFFFFFF);
        printf ("%d, %s", (int) t, asctime (gmtime (&t)));
        t++;
        printf ("%d, %s", (int) t, asctime (gmtime (&t)));
        return 0;
    }
    output
    Code:
    1000000000, Sun Sep  9 01:46:40 2001
    2147483647, Tue Jan 19 03:14:07 2038
    -2147483648, Fri Dec 13 20:45:52 1901
    and my personal experincewhich i have encountered this problem is
    Code:
    1> Change your date to just a second after the critical time
    2> Now Run Some Applicatins Like I have Tried yahoo messenger
    3> Look what happned.It will not work.
    
    Note : I have tried this thing on Win98.
    for more information visit;-}
    http://www.2038bug.com/index.html -from where i get code
    http://en.wikipedia.org/wiki/2038_bug -online encyclopedia
    http://www.johntitor.com/ -The man from future

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    I don't think we will be using decrepit antique software like that in 2038.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    Quote Originally Posted by adrianxw
    I don't think we will be using decrepit antique software like that in 2038.
    Or 32 bit processors. (almost) Everything you buy now comes with 64 bit support.
    In a few years time nothing will be just 32 bit, with the possible exception of PDAs and mobile phones.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    Nice thinking, year2038bug, but it seems like it was a waste of time.
    Did you sign up here just to post that?

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    22
    Not singed up here for this post

    Just want to get you all aware of current problems

  6. #6
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    I'm going out to buy bottled water now!

  7. #7
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Current? This won't happen for another 23 years!? Do you have any idea what has happened in the past 23? This will be as big of a problem as the Y2K thing was. (read: nothing will happen)
    EntropySink. You know you have to click it.

  8. #8
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by ober
    Current? This won't happen for another 23 years!? Do you have any idea what has happened in the past 23? This will be as big of a problem as the Y2K thing was. (read: nothing will happen)
    The reason Y2K bugs did nothing was because everyone spent Trillions$$ fixing the problems before 2000 came around.

    I recall vividely saying in 1970 that the Y2K bugs were unimportant because nobody would be using our current software by then. WRONG! There were lots of people still using 30-year old programs by year 2000.

    So, when you write commercial programs today you need to be aware of the problems that might occur 30 years or more in the future because you may have to fix your own bugs like I did.

  9. #9
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by Ancient Dragon
    I recall vividely saying in 1970 that the Y2K bugs were unimportant because nobody would be using our current software by then. WRONG! There were lots of people still using 30-year old programs by year 2000.
    this is something completely unrelated. the reason the Y2K bug was such a "big" thing was because programmers were using two zeros for years instead of four. this has to do with the size of the memory being used to store things, which will change within the next 30 years
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  10. #10
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by major_small
    this is something completely unrelated.
    maybe yes, and maybe no. in 2038 will there be any programs running that were written in 2005? Not a lot, but probably some, and that was my point. Any program written today that uses time() functions will not work after 2038.

    You don't have to wait until 2038 to encounter the problem. Any program that uses time() can not be used to calculate dates beyond Tue Jan 19 03:14:07 2038.

    Here is one solution that can be used today with any compiler that supports _int64 data type.
    Last edited by Ancient Dragon; 09-04-2005 at 06:24 AM.

  11. #11
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Quote Originally Posted by ober
    This won't happen for another 23 years!?
    Quote Originally Posted by calculator
    2038 - 2005 = 33

  12. #12
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Quote Originally Posted by LuckY
    stuff...
    33... 23... who cares? (it was close to the end of the day and I was slowing down a tad )
    EntropySink. You know you have to click it.

  13. #13
    C(++)(#)
    Join Date
    Jul 2004
    Posts
    309
    Ober is clearly planning on humans messing up time-travel and having all of humanity jump forward 10 years.
    To code is divine

  14. #14
    Banned
    Join Date
    Jun 2005
    Posts
    594
    wouldnt be the first time,

    remember when china invaded the US, didnt
    think so.

  15. #15
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    i remember, that was... nasty...
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 02:20 PM
  2. Calendar Problem
    By wordup in forum C Programming
    Replies: 7
    Last Post: 10-29-2002, 03:36 PM
  3. error with code
    By duffy in forum C Programming
    Replies: 8
    Last Post: 10-22-2002, 09:45 PM
  4. cant get code to work
    By duffy in forum C Programming
    Replies: 13
    Last Post: 10-20-2002, 05:23 AM
  5. Simplified code
    By soonerfan in forum C Programming
    Replies: 2
    Last Post: 12-05-2001, 03:50 PM