Thread: a problem with c

  1. #1

    Post a problem with c

    i heard that time.h library will give error messages in 2038.
    is that true

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    There are bound to be time problems in the future...... so start saving for a new compiler....... you only have 36 years

  3. #3
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    The 2038 problem is not a problem with the C language - it is a problem with the way computers track time. The short answer is your computer tracks the number of seconds since "epoch" (Jan 1, 1970) in a variable. On POSIX systems, this variable type is 'time_t', which is actually a typedef for long. Sometime in 2038, the number of seconds since epoch will be greater than the value a long can hold.

    I intend to be retired before 2038, so I'm not too worried about it ;)

    More information here.
    Last edited by Deckard; 01-15-2002 at 10:41 AM.
    Jason Deckard

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM