Re: [PHP] the Y2K38 BUG
[email protected] (Stephen Johnson)
| Newsgroups | php.general |
|---|---|
| Message-ID | <C446920F.1439D4%[email protected]> |
Seriously.... If your apps are still being used in 2038 ... WOW! This is an issue that will more then likely be well resolved LONG before 2038... On 5/6/08 10:50 PM, "Nathan Nobbe" <[email protected]> wrote: > On Tue, May 6, 2008 at 10:57 PM, Paul Scott <[email protected]> wrote: > >> >> On Wed, 2008-05-07 at 10:03 +0530, Chetan Rane wrote: >>> Have guys heard of the the Y2K38 Bug more details are on this link >>> >> >> Nope, but I can guess what its about. >> >>> Can there be a possible solution. As the system which I am developing >>> for my client uses Unix timestamp. >>> >> >> There are probably multiple solutions. AFAIK time is a 32 bit signed >> int, making it unsigned would add like 100 years onto your app. >> >>> This might effect my application in the future >>> >> >> If your app survives that long! Why not just maintain it and when times >> change, your app changes? :) >> >> Seriously, this is really not a big deal! > > > true-that ;) > anyway, the DateTime class is implemented as a 64-bit unsigned (i think) > value. so if you use it you should be good to go. > > php > echo date_create('2040-10-24')->format('M-d-Y'); > Oct-24-2040 > > -nathan -- Stephen Johnson The Lone Coder http://www.ouradoptionblog.com *Join us on our adoption journey* [email protected] http://www.thelonecoder.com *Continuing the struggle against bad code* --