如何根据日期将unix时间戳正确转换为BST或GMT?

I can easily write a clumsy function to do this, but is there an easy way to get the "correct" local UK date/time from a timestamp, rather than it always being GMT (which at certain times of year - like now - would be an hour behind).

Thanks

The exact date when the UK changes timezone changes by year, so I wouldn't recommend trying to implement the logic yourself. You can initialise a DateTime object to the correct timezone (Europe/London), and then set it to your timestamp:

<?php
$timestamp = 1500000000;

$dateTime = new \DateTime(null, new DateTimeZone('Europe/London'));
$dateTime->setTimestamp($timestamp);

echo $dateTime->format('Y-m-d H:i:s');

// 2017-07-14 03:40:00