Should the timezone in general settings effect the output of $time = date("g:ia");? I am using the following in a plugin which I would expect to simply output the time of the server.

// get current time
$time = date("g:i a");
// outputs 9:36am


In a straight .php file this is correct - however, from within the plugin the time is an hour out - 8:36am. I imagine this might be to do with British Summer Time. However, in Crafts general settings I have set Timezone to UTC+1 (BST) - Europe/London
Yes, Craft calls date_default_timezone_set('UTC'); when initializing, so PHP will output all times in UTC by default.

If you want to output a time using the timezone that Craft has been set to in General Settings, you can do that with a DateTime object.

$now = new DateTime();
$time = $now-&gt;format('g:i a');