Works fine here. Are you actually in EDT?
On Wed, 10 Jul 2002, Brian V Bonini wrote:
> Any idea why this is off by 4 hours?
>
> Server time zone is set correctly,
> %date
> Wed Jul 10 14:26:18 EDT 2002
> but the script below returns the time as being 4 hours later then that.
>
>
> <?
> $date = getdate();
> $minutes = $date['minutes'];
> $hours = $date['hours'];
> $tz="EDT";
> $today = getdate();
> $month = $today['month'];
> $mday = $today['mday'];
> $year = $today['year'];
> $ampm="AM";
> if ($hours > 12) {
> $hours=$hours-12;
> $ampm="PM";
> } elseif ($hours == 12) {
> $ampm="PM";
> }
> if ( $minutes < 10) {
> $minutes="0$minutes";
> }
> print "$hours:$minutes $ampm $tz $month $mday, $year";
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php