Hi,

    offset = 1day + 1hour + 10 secs = 24 * 60 * 60 + 60 * 60 + 10 (seconds)
    time() + offset = the time you need
or
    $now = explode('.', date("d.m.Y.H.i.s", time());
    $now is array ( 0 => the day, 1 => the month. aso)
    add to the elements of the array the values you need
    then turn it back into a timestamp with mktime()

Cheers,
Catalin

"Ryan A" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I have a datetime field in my table, i want to enter a datetime 1 day,1
hour
> and 10 mins into the future from today/the present, how do i calculate
that?
>
> This is for the expiring links/members part of a script i am trying to
> create.
>
>
> I have looked around the archive and google but maybe i didnt find the
> correct thread.
> Google turned up these revelient results but are not too much help:
>
http://forums.devshed.com/showthread.php?threadid=4238&kw=get+current+date+and+time+of+server
>
> useing the date function
> http://www.phpbuilder.com/mail/php-general/2002062/1026.php (rasmus)
>
> now()
> http://www.phpbuilder.com/mail/php-general/2002062/1033.php (john)
>
> This was very helpful but it brings up the other question of is the local
> php time on the server the same as the one on mysql? Logically it should
be
> but......
>
http://www.google.com/url?sa=U&start=3&q=http://www.phpbuilder.com/manual/ref.datetime.php&e=7391
>
>
>
> Thanks in advance,
> -Ryan
>
>
> We will slaughter you all! - The Iraqi (Dis)information ministers site
> http://MrSahaf.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to