bug #1449 Fixed the date filter's timezone not being set correctly with strings (gbouchez)
bug #1449 Fixed the date filter's timezone not being set correctly with strings (gbouchez)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed the date filter's timezone not being set correctly with strings

When the date filter is used on a string and the timezone argument is specified, the timezone is ignored because of this :

    $date = new DateTime($date, $defaultTimezone);
    if (false !== $timezone) {
        $date->setTimezone($defaultTimezone);
    }

Since the date is initialized with `$defaultTimezone` as its timezone, using `$date->setTimezone($defaultTimezone);` has no effect, and the date is displayed without changes since it is considered to already be from this timezone.

Might fix issue #1340

Commits
-------

44aaa5b Fixed the date filter's timezone not being set correctly with strings

dkarvounaris/Twig,moufmouf/Twig,huang53798584/Twig,framewr/Twig,jamessingizi/Twig,robregonm/Twig,hhamon/Twig,nicolas-grekas/Twig,huang53798584/Twig,moufmouf/Twig,dkarvounaris/Twig,Rvanlaak/Twig,twigphp/Twig,gencer/Twig,iKwinto/Twig,znerol/Twig,jamessingizi/Twig,twigphp/Twig,hason/Twig,bocharsky-bw/Twig,robregonm/Twig,bocharsky-bw/Twig,apishka/templater,bocharsky-bw/Twig,fsw/Twig,Rvanlaak/Twig,derickr/Twig,framewr/Twig,hhamon/Twig,Tobion/Twig,nicolas-grekas/Twig,moltin/Twig,framewr/Twig,hhamon/Twig,Tobion/Twig,fsw/Twig,twigphp/Twig,moltin/Twig,jamessingizi/Twig,gamernetwork/Twig,moufmouf/Twig,craue/Twig,derickr/Twig,hason/Twig,moltin/Twig,loi-chuanoi/Twig,craue/Twig,iKwinto/Twig,znerol/Twig,hason/Twig,znerol/Twig,apishka/templater,dkarvounaris/Twig,gencer/Twig,nicolas-grekas/Twig,nicolas-grekas/Twig,robregonm/Twig,iKwinto/Twig,gamernetwork/Twig,gamernetwork/Twig,huang53798584/Twig,Tobion/Twig,Rvanlaak/Twig,nicolas-grekas/Twig,fsw/Twig,derickr/Twig