[PHP] Time calculation after UNIX

2002-01-16 Thread Olav Drageset

Hi

I have a database that is supposed to last more than 30 years

Could someone advice me how to calculate (add and subtract) time in a maner that willl 
be correct 
after 2030 when Unix Time stop working?

ragards

[EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Shane Wright


Use 64bit integers!  They'll count up to a much higher number and will last 
way beyond 2038.

In the database, set the correct type (INT8 in PostgreSQL, dont know about 
the others).  Dont worry about PHP as I'm sure there'll be a few newer 
versions supporting wider int formats before then (if it doesn't already??)

--
Shane

On Wednesday 16 Jan 2002 9:33 am, Olav Drageset wrote:
 Hi

 I have a database that is supposed to last more than 30 years

 Could someone advice me how to calculate (add and subtract) time in a maner
 that willl be correct after 2030 when Unix Time stop working?

 ragards

 [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Jimmy

Hi Olav,

 I have a database that is supposed to last more than 30 years
 Could someone advice me how to calculate (add and subtract) time in a maner
 that willl be correct after 2030 when Unix Time stop working?

if you are using MySQL, then use datetime or date column type.
they can support date range from '1000-01-01' to '-12-31'.

and for calculation, you can use MySQL function:
ADDDATE() or SUBDATE()

--
Jimmy

Bigamy is having one spouse too many.  Monogamy is the same.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Bogdan Stancescu

An excerpt from the mysql manual:
---
1.7 Year 2000 Compliance
MySQL itself has no problems with Year 2000 (Y2K) compliance:

MySQL uses Unix time functions and has no problems with dates until 2069
---

However, it seems to me that this is the way to go indeed, because you can always
upgrade MySQL in on December 31st, 2068 (if you're 30 now, you'll be 96 then, so
no problems - just leave some installation instructions your will). :-)

Bogdan

Jimmy wrote:

 Hi Olav,

  I have a database that is supposed to last more than 30 years
  Could someone advice me how to calculate (add and subtract) time in a maner
  that willl be correct after 2030 when Unix Time stop working?

 if you are using MySQL, then use datetime or date column type.
 they can support date range from '1000-01-01' to '-12-31'.

 and for calculation, you can use MySQL function:
 ADDDATE() or SUBDATE()

 --
 Jimmy
 
 Bigamy is having one spouse too many.  Monogamy is the same.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]