Is this right

I’ve just been browsing to see if there is a function to show the correct time and calculate if its DST.

The examples on the require at least 10 lines of code so I’ve come up with this, it seems to look right but i’m not sure

$dst = date(‘I’);
$gm_hour = gmdate(‘g’);
$curr_hour = ($gm_hour + $dst);
echo gmdate($curr_hour.’:i a’); ?>

It ust looks to easy after looking at everyone elses

Not sure, I guess the best method is TIAS.

(Try It And See) :)

It works fine but just looks to simple.

Sponsor our Newsletter | Privacy Policy | Terms of Service