You could try to change date("m") to date("n"), and date("d") to date("j").
It looks that sometimes mktime() doesn't remove the trailing zeroes and
returns totally different dates.

The other thing you could try is
$date = date("F dS, Y g:i:s A", date("U")+18000);

this one takes the number seconds of seconds between
the Unix Epoch (January 1 1970) and the currend time and adds 5 hours (18000

Hope this helps
Dobromir Velev

-----Original Message-----
From: Matt Nigh <[EMAIL PROTECTED]>
To: php-db <[EMAIL PROTECTED]>
Date: Wednesday, November 28, 2001 03:49
Subject: [PHP-DB] date format question

i'm wondering if anyone could help me in formatting a date so it is 5 hours
ahead of the server time.
here's the code i'm using but it doesn't seem to work:

$date = date("F dS, Y g:i:s A",
mktime(date("g")+5,date("i"),date("s"),date("m"),date("d"),date("Y")) );

i've already looked in the manual and around the net for stuff, but wasn't
able to find anything for what i needed.
if anyone could help out, i'd appreciate it.



PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to