Re: strtotime

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

 



Hi guys

I have a question:

<snip>
Ashley Sheridan wrote on 14/01/2010 19:20:
MySQL uses a default "0000-00-00" value for date fields generally, but
when converted into a timestamp, the string equates to a false value. In
PHP, timestamps are numerical values indicating the seconds since
Midnight of the 1st January 1969. As PHP uses loose data typing, false
</snip>

Adam Richardson wrote on 14/01/2010 19:25:
<snip>
2. date returns 1969, because it's not passed a valid timestamp and it works from December 31, 1969 for any invalid date.
</snip>

Why is this? Unixtime starts at January 1st 1970 GMT (see for instance http://php.net/microtime), I've never heard of the other dates you mentioned.

My guess is the time, date or GMT is wrong for Johns setup and that's why he get 1969 and not 1970, cause something is seting time in the past

--
Kind regards
Kim Emax - masterminds.dk

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


[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