? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
30 Apr 2017

Pull Request for Issue #14587

Summary of Changes

As described in #14587 jDate incorrectly resets the TZ if the server default time zone not UTC.
In some reason jDate resets TZ to the server default instead of "previous state".
This patch fixing this strange behavior.

Testing Instructions

In the root index.php add

date_default_timezone_set('Europe/Berlin'); // emulate server time zone Europe/Berlin

in template index.php add:

date_default_timezone_set('UTC');
var_dump(date_default_timezone_get());
$someDate = JDate::getInstance('now -3 day');
var_dump(date_default_timezone_get());

Expected result

var dump should show:
'UTC'
'UTC' // correct

Actual result

'UTC'
'Europe/Berlin' // incorect

note: if it will be accepted, then I guess need deprecation notes for $gmt; and $stz; in Joomla! 3.x

avatar Fedik Fedik - open - 30 Apr 2017
avatar Fedik Fedik - change - 30 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2017
Category Libraries
avatar Fedik
Fedik - comment - 30 Apr 2017

meh, something heavily failed ?

avatar Fedik Fedik - change - 30 Apr 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-04-30 10:40:35
Closed_By Fedik
Labels Added: ?
avatar Fedik Fedik - close - 30 Apr 2017
avatar Fedik Fedik - change - 30 Apr 2017
The description was changed
avatar Fedik Fedik - edited - 30 Apr 2017
avatar Fedik Fedik - change - 30 Apr 2017
The description was changed
avatar Fedik Fedik - edited - 30 Apr 2017

Add a Comment

Login with GitHub to post a comment