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 18:34

Rithish wrote:
> Hello. I noticed a strange thing while using strtotime() and date()
> functions in combination to generate from MySQL into a readable format.
>
> By default, the MySQL date field will be 0000-00-00 00:00:00 When I
> pass this to strtotime() to generate the timestamp, and then pass it to
> the date function, it generates 30-11-1999.

>From http://dev.mysql.com/doc/refman/5.1/en/datetime.html:
"The supported range is '1000-01-01 00:00:00' to '9999-12-31
23:59:59'..."

0000-00-00 is not in the supported range of times in MySQL.


--
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

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