On line 297 of system/ee/legacy/libraries/Core.php
the timezone is set to the timezone setting in userdata
unless there is no userdata timezone, in which case it goes to the default config timezone.
EXCEPT…
The second argument of ee()->session->userdata()
to specify what to fall back to checks if the item is set, not if it’s a falsy value. On an EE 2 site I updated to EE 4, most of the user’s timezone userdata is set to an empty string. Hence, because of the conditional on line 300, we wind up with UTC as the default. This seems like a bug to me as, if the timezone does not exist on the userdata (and empty string should indicate it does not exist), then it should fall back to the site default.
Changing line 297 to the following yields the correct results here:
php
$timezone = ee()->session->userdata('timezone') ?: ee()->config->item('default_site_timezone');
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```