You are here: Re: how to increase given date by 30 sec « PHP Language « IT news, forums, messages
Re: how to increase given date by 30 sec

Posted by Christoph Burschka on 04/05/07 14:46

Sean schrieb:
> "Nancy Illegems" <nancy.illegems@telenet.be> wrote in message
> news:002Rh.103784$3n5.690212@phobos.telenet-ops.be...
>
>>
>
> Someone may have a better way, but I am sure that this would do the trick.
>
> $newtime = mktime(date("h"), date("i"), date("s") + 30, date("m") ,
> date("d")+1, date("Y"));
>
>
> Sean
>
>
>

Wow... that's really taking the long way round, isn't it?

With the example you've named (the current time), how about this:

$newtime=time()+30

Of course, if you already have the date as a string, try something like
this:

$newtime=strtotime("2007-04-01 6:35:04")+30;

 

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

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