Re: 64 bit date in 32 bit php ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-01-18 at 22:46 -0800, Michael A. Peters wrote:

> php 5.2.12 running in CentOS 5.x
> 
> Unfortunately, both my server (xen linode) and my test server (crappy 
> old dell I found in a field) are 32-bit. I need to work with some dates 
> earlier than 1901 and I would really prefer to store them in *nix time 
> in the database and use the date() function to format them for display 
> when I need to.
> 
> My understanding is that 32 bit php has a lower limit in 1901 and upper 
> limit in 2038 for the date function.
> 
> Is there a pcre / pecl / other wrapper that behaves identical to the 
> date function but uses a 64 bit float in 32 bit php?
> 
> Yes, the right thing to do is probably to use 64 bit, and if I could I 
> would. A wrapper that just passes it off to date on 64 bit systems and 
> to date on 32 bit systems within what data can handle and only does its 
> magic on 32 bit systems with values beyond 32-bit date capabilities 
> would be sweet.
> 


I've not used it, but the Pear Date class looks like it should do what
you need. I've used other Pear classes before, and they are pretty easy
to get to grips with, so I assume it should be the same for this one
too.

http://pear.php.net/package/Date

Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux