> I am trying to use the PHP strtotime() function in this manner
>
> $testdate = strtotime('1969-12-31');
>
> in order to return a UNIX timestamp.
>

This will return -1 (bogus date) as you said.

> My understanding is that UNIX time stamps can be negative to indicate
> dates prior to 1 Jan 1970.
>
> Is this assumption correct?
>

This is correct.

You may refer to (PHP 3 + 4):
http://www.acay.com.au/~oscarp/php/index.html

> The problem is that any valid date prior to 1 Jan 1970 causes the function
> to fail and return the value -1 and that is taken as a valid timestamp.
>

When it returns -1, it is to be interpreted as bogus date. Any date prior
will return -1.

> What function should I be using to get a timestamp for a date prior to 1
> Jan 1970?
>

What I'll do in my case will be to construct a php function to do the task
when
date is before '1 Jan 1970' using the available date functions. Perhaps, an
associative array.

Oscar Plameras
http://www.acay.com.au/~oscarp/disclaimer.html

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to