Is it me or are everyone responding how to give a the date in here?
The timestamp is still time() and not date() isnt it?
Timestamp works in seconds, so 1 hour is : 60 seconds * 60 minutes.
$hour = 60*60;
$day = 24*$hour;
timestamp for 125 days into the future would then be,
$future
hope it'll help
.mtg.
- Original Message -
From: "Chris Boget" <[EMAIL PROTECTED]>
To: "Naqashzade, Sadeq" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Monday, January 13, 2003 3:59 PM
Subject: Re: [PHP] Re: Ch
> How can I find time stamp for example 125 next days.
$oneDay = ( 60 * 60 * 24 );
$timeStamp = date( "U" ) + ( $oneDay * 125 );
> or 03:30 hours next?
$oneHour = ( 60 * 60 );
$timeStamp = date( "U" ) + ( $oneHour * 3.5 );
This is just one of the many different ways it can be done.
Chris
--
On Sunday 11 January 2004 20:52, Naqashzade, Sadeq wrote:
> So Thanks, but can you get me some example code?
There are plenty of examples in the manual!
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet
i.e.
// getting the current time in an array
$timeval=localtime();
// we want the time 3 hours in the future
$timeval[2] = $timeval[2]+3;
// calc the new timestamp
$timestamp=mktime ($timeval[2], $timeval[1], $timeval[0], $timeval[4], $timeval[3],
i$timeval[5]);
An ev
So Thanks, but can you get me some example code?
Regards,
Sadeq
"Thomas Seifert" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> http://de.php.net/manual/en/function.mktime.php
>
> The most important part is
> "mktime() is useful for doing date arithmetic and
http://de.php.net/manual/en/function.mktime.php
The most important part is
"mktime() is useful for doing date arithmetic and validation, as it will automatically
calculate the correct value for out-of-range input."
Thomas
On Sun, 11 Jan 2004 16:12:01 +0330 [EMAIL PROTECTED] (Sadeq Naqashzade
7 matches
Mail list logo