Forum Moderators: coopster
$date = date("Ymdh0000", mktime(date("h")+3));
Otherwise this might be better as it should work regardless of the server time:
$date = gmdate("Ymdh0000", mktime(date("h")-5));
P.S: you put an extra "h" in the date format
Doesn't seem to be working since this line don't adjust the date.
$date = date("Ymdh0000", mktime(date("h")+3));
For example, EST is supposed to be 12:45am the next day right now when PST is still 9:45pm August 23th, but the date returns 20030823120000. I was expecting 20030824120000.
Is there a workaround to this problem?
Thanks again for your help!
Perhaps someone else can shed some light on this?
Try date("a") to see if the AM/PM are correct. If they are, the problem is beyond me :).
$now = date("YmdH0000 D");
$date = date("YmdH0000 D", mktime(date("H")+3));
print "$now -> $date";
OUTPUT:
20030823230000 Sat -> 20030824020000 Sun
Not sure if the my PHP implementation is different than yours... if so, that could explain the discrepancy of our results.
THanks!