User tests: Successful: Unsuccessful:
Pull Request for Issue #14587
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.
In the root index.php add
date_default_timezone_set('Europe/Berlin'); // emulate server time zone Europe/Berlinin 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());var dump should show:
'UTC'
'UTC' // correct
'UTC'
'Europe/Berlin' // incorect
note: if it will be accepted, then I guess need deprecation notes for $gmt; and $stz; in Joomla! 3.x
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-30 10:40:35 |
| Closed_By | ⇒ | Fedik | |
| Labels |
Added:
?
|
||
meh, something heavily failed?