I am trying to convert a time from timezone Europe/London (GMT) to Europe/Amsterdam (GMT+01:00).
Code:
// Wrong
date_default_timezone_set('Europe/London');
$date = new Zend_Date('11-02-10 10:00', Zend_Date::DATETIME_SHORT, 'nl'); // 11 feb 2010 10:00
echo $date->get(Zend_Date::ISO_8601) . '<br/>'; // 2010-02-10T09:00:00+00:00
$date->setTimezone('Europe/Amsterdam');
echo $date->get(Zend_Date::ISO_8601) . '<br/>'; // 2010-02-10T10:00:00+01:00
// Expected
date_default_timezone_set('GMT');
$date = new Zend_Date('11-02-10 10:00', Zend_Date::DATETIME_SHORT, 'nl'); // 11 feb 2010 10:00
echo $date->get(Zend_Date::ISO_8601) . '<br/>'; // 2010-02-11T10:00:00+00:00
$date->setTimezone('Europe/Amsterdam');
echo $date->get(Zend_Date::ISO_8601) . '<br/>'; // 2010-02-11T11:00:00+01:00
- When I use Europe/London as input timezone it converts the time (-1 hour)
- When I use GMT as input timezone the conversion is ok
Why is there a time conversion when I use Europe/London. Europe/London == GMT right?
Does anyone know what I am doing wrong?