I have tried doing this using Zend, by date_default_timezone_set('Europe/Copenhagen');,
but this will change the time zone for all of the future Zend_Date calls (if I am not mistaken).

I just need to assign the current time in Copenhagen to one variable.

$now = new DateTime();
$now->setTimezone(new DateTimezone('Europe/Copenhagen'));
echo $now->format('Y-m-d H:i:s');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.