Re: [PHP-DB] win32 Timestamp problem

2004-03-10 Thread John Lim
Hi,

See http://php.weblogs.com/adodb_date_time_library

I wrote this to fix this problem.

INTRODUCTION

PHP native date functions use integer timestamps for computations. Because
of this, dates are restricted to the years 1901-2038 on Unix and 1970-2038
on Windows due to integer overflow for dates beyond those years. This
library overcomes these limitations by replacing the native function's
signed integers (normally 32-bits) with PHP floating point numbers (normally
64-bits).


"Mike Ford" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 09 March 2004 20:36, J. Kevin C. Burton wrote:
>
> > Hey all, after reading documentation on the Win32 bug
> > regarding Timestamps
> > not being able to go prior than 1970..
> >
> > I am in need of a way to calculate someone's age.
> >
> > Has anyone found a fix or workaround for this bug? Or a way
> > to calculate age
> > without using the timestamp?
> >
> > They say that v5 of PHP will fix this issue, but I've been using every
> > stable release of PHP5 and it's a no go.
>
> No, it won't.  It's an operating system issue, and nothing PHP *can* fix.
>
> > Any help would be appreciated.
>
> Have you looked at the Calendar extension? http://www.php.net/calendar
>
> Cheers!
>
> Mike
>
> -
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] win32 Timestamp problem

2004-03-10 Thread IMAC, Sebastian Mangelkramer
Will this fit you needs?

  


Am Mittwoch, 10. März 2004 12:31 schrieb Ford, Mike [LSS]:
> On 09 March 2004 20:36, J. Kevin C. Burton wrote:
> > Hey all, after reading documentation on the Win32 bug
> > regarding Timestamps
> > not being able to go prior than 1970..
> >
> > I am in need of a way to calculate someone's age.
> >
> > Has anyone found a fix or workaround for this bug? Or a way
> > to calculate age
> > without using the timestamp?
> >
> > They say that v5 of PHP will fix this issue, but I've been using every
> > stable release of PHP5 and it's a no go.
>
> No, it won't.  It's an operating system issue, and nothing PHP *can* fix.
>
> > Any help would be appreciated.
>
> Have you looked at the Calendar extension? http://www.php.net/calendar
>
> Cheers!
>
> Mike
>
> -
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

-- 
Sebastian Mangelkramer

IMAC - Information & Management Consulting
Blarerstraße 56,   D-78462 Konstanz
Tel. +49 (0)7531 - 90 39-12
Fax +49 (0)7531 - 90 39-47
E-Mail: [EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] win32 Timestamp problem

2004-03-10 Thread Ford, Mike [LSS]
On 09 March 2004 20:36, J. Kevin C. Burton wrote:

> Hey all, after reading documentation on the Win32 bug
> regarding Timestamps
> not being able to go prior than 1970..
> 
> I am in need of a way to calculate someone's age.
> 
> Has anyone found a fix or workaround for this bug? Or a way
> to calculate age
> without using the timestamp?
> 
> They say that v5 of PHP will fix this issue, but I've been using every
> stable release of PHP5 and it's a no go.

No, it won't.  It's an operating system issue, and nothing PHP *can* fix.

> Any help would be appreciated.

Have you looked at the Calendar extension? http://www.php.net/calendar

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] win32 Timestamp problem

2004-03-10 Thread Jason Wong
On Wednesday 10 March 2004 04:36, J. Kevin C. Burton wrote:
> Hey all, after reading documentation on the Win32 bug regarding Timestamps
> not being able to go prior than 1970..
>
> I am in need of a way to calculate someone's age.
>
>
> Has anyone found a fix or workaround for this bug? Or a way to calculate
> age without using the timestamp?

As you're asking on the PHP-DB list I would assume that your dates are stored 
in a database of some sort, in which case you could use your database's 
native functions to do your date calculations.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
Neither spread the germs of gossip nor encourage others to do so.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] win32 Timestamp problem

2004-03-09 Thread Marcjon Louwersheimer
Not sure if this'll help you, but I like to store my dates/times using
this format: date("Y-m-d H:i:s") It's always a 19 character string, so
you could use the substr function to get different parts of the date.
substr(date("Y-m-d H:i:s"),0,4) would get the year, for example. Hope
this helps.
-- 
  Marcjon

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] win32 Timestamp problem

2004-03-09 Thread J. Kevin C. Burton
Hey all, after reading documentation on the Win32 bug regarding Timestamps
not being able to go prior than 1970.. 

I am in need of a way to calculate someone's age.


Has anyone found a fix or workaround for this bug? Or a way to calculate age
without using the timestamp?

 

They say that v5 of PHP will fix this issue, but I've been using every
stable release of PHP5 and it's a no go.

 

Any help would be appreciated.

 

 

Regards

 

Kevin