You are here: Re: unusual behaviour of strtotime() for '0000-00-00 00:00:00' input « PHP Programming Language « IT news, forums, messages
Re: unusual behaviour of strtotime() for '0000-00-00 00:00:00' input

Posted by Oli Filth on 04/21/06 19:23

Rithish said the following on 21/04/2006 16:44:
> Oli Filth wrote:
>> 0000-00-00 is not in the supported range of times in MySQL.
>>
>
> Ok. But why does strtotime() throw a timestamp for 30-11-1999?

Oops, sorry, misread your original code, I thought you were referring to
MySQL functionality.

0000-00-00 isn't a valid date string at all in PHP (i.e. you can't have
the zero-th day of the zero-th month). I guess anything that
strtotime() returns is purely arbitrary, although one would expect it to
return FALSE, as the manual implies.


--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация