What should we do to prepare for 2038?

后端 未结 10 1873
耶瑟儿~
耶瑟儿~ 2020-11-28 07:23

I would like to think that some of the software I\'m writing today will be used in 30 years. But I am also aware that a lot of it is based upon the UNIX tradition of exposin

相关标签:
10条回答
  • 2020-11-28 08:01

    By 2038, time libraries should all be using 64-bit integers, so this won't actually be that big of a deal (on software that isn't completely unmaintained).

    COBOL programs might be fun though.

    0 讨论(0)
  • 2020-11-28 08:02

    You can always implement RFC 2550 and be safe forever ;-)

    The known universe has a finite past and future. The current age of the universe is estimated in [Zebu] as between 10 ** 10 and 2 * 10 ** 10 years. The death of the universe is estimated in [Nigel] to occur in 10 ** 11 - years and in [Drake] as occurring either in 10 ** 12 years for a closed universe (the big crunch) or 10 ** 14 years for an open universe (the heat death of the universe).

     

    Y10K compliant programs MAY choose to limit the range of dates they support to those consistent with the expected life of the universe. Y10K compliant systems MUST accept Y10K dates from 10 ** 12 years in the past to 10 ** 20 years into the future. Y10K compliant systems SHOULD accept dates for at least 10 ** 29 years in the past and future.

    0 讨论(0)
  • 2020-11-28 08:02

    Operative word being "should".

    If you need to ensure futureproofing then you can construct your own date/time class and use that but I'd only do that if you think that what you write will be used on legacy OS'

    0 讨论(0)
  • 2020-11-28 08:03

    I think that we should leave the bug in. Then about 2036 we can start selling consultancy for large sums of money to test everything. After all isn't that how we successfully managed the 1999-2000 rollover.

    I'm only joking!

    I was sat in a bank in London in 1999 and was quite amazed when I saw a consultant start Y2K testing the coffee machine. I think if we learnt anything from that fiasco, it was that the vast majority of software will just work and most of the rest won't cause a melt down if it fails and can be fixed after the event if needed. As such, I wouldn't take any special precautions until much nearer the time, unless you are dealing with a very critical piece of software.

    0 讨论(0)
提交回复
热议问题