a problem with c

This is a discussion on a problem with c within the C Programming forums, part of the General Programming Boards category; i heard that time.h library will give error messages in 2038. is that true...

  1. #1
    Unregistered
    Guest

    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
    Posts
    5,789
    There are bound to be time problems in the future...... so start saving for a new compiler....... you only have 36 years

  3. #3
    B26354 Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    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.

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

    More information here.
    Last edited by Deckard; 01-15-2002 at 09: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, 10: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21