Hi,

Monday, February 3, 2003, 11:10:36 AM, you wrote:
DLM> Hello friends.

DLM> The follwing code displays the date on my webpage :

DLM> echo date ("l dS of F Y h:i:s A");

DLM> However, I need to add 12 hrs to this date befor displaying on the webpage. Can 
someone please help me to modify the above code?

DLM> Thanks
DLM> Denis


use strtotime to get the timestamp for date like this

echo date ("l dS of F Y h:i:s A", strtotime('+12 hours'));

If this is to compensate for a timezone difference you could also set the
timezone at the top of the page, for example

putenv('TZ=Australia/Brisbane');

Then date by itself will give the desired result

-- 
regards,
Tom


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

Reply via email to