You are here: Re: subtract 1 day « PHP Programming Language « IT news, forums, messages
Re: subtract 1 day

Posted by meltedown on 04/03/06 11:59

Andy Jeffries wrote:
> On Mon, 03 Apr 2006 08:06:55 +0000, meltedown wrote:
>> I can't see what I'm doing wrong. I'm subtracting 60*60*24 from a unix
>> time stamp and the result is 23 hours earlier, not 24. Start with a unix
>> time stamp:
>
> Try doing this instead:
>
> $unixtime2 = strtotime("-1 day", $unixtime);
>
> I couldn't see what you were doing wrong in your code from a quick glance,
> but the above way is easier to read anyway.
>
> Cheers,
>
>
> Andy
>
Thanks that really helped a lot, five minutes to fix what I've been
banging my head against all night. Funny thing is that code worked fine
for a year and it still works for most dates but it hit that one date
and didn't work right.

 

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

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