Re: strtotime()

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

 



On Mon, 2010-08-23 at 16:04 -0400, Rick Pasotto wrote:

> On my home machine running 5.3.2-2 in debian linux the commands:
> 
> echo date('Y-m-d',strtotime('first day of this month')).'<br/>';
> echo date('Y-m-d',strtotime('last day of next month'));
> 
> give the expected results.
> 
> I just got setup with a hosting provider running 5.2.13 on BSD and both
> give '1969-12-31'.
> 
> What could be causing this? The second command is straight from the
> manual and the first is clearly implied.
> 
> So far everything else seems to work as expected.
> 
> -- 
> "Economics is extremely useful as a form of employment for economists."
> 		-- John Kenneth Galbraith
>     Rick Pasotto    rick@xxxxxxxx    http://www.niof.net
> 


The example you quote as being straight from the manual page is actually
from the user-submitted code snippets, and I can't find the
documentation to support it. I can only assume that it's possibly an
experimental thing, or something that shouldn't work but by freak
coincidence does occasionally. Maybe use mktime() instead to get the
dates?

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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